snipara-companion 3.6.13 → 3.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  Release notes for `snipara-companion`, newest first.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## New In 3.6.15
8
+
9
+ - Adds typed `minimumChangeEvidence` forwarding for hosted context queries and
10
+ code-impact reviews, including bounded provenance and preservation-guard
11
+ receipts.
12
+
13
+ ## New In 3.6.14
14
+
15
+ - Adds opt-in `--minimum-change-mode review` forwarding for hosted context
16
+ queries and code-impact reviews, including the evidence-backed
17
+ minimum-safe-change receipt in answer packs.
18
+
19
+ - Lets managed `pre-commit` and `pre-push` hooks receive an explicit,
20
+ one-operation review-only acknowledgement through
21
+ `SNIPARA_COLLABORATION_GUARD_ACK_REVIEW_ONLY=1`; the hook immediately
22
+ re-runs without the flag so blocking leases and hard conflicts remain
23
+ enforced.
24
+
5
25
  ## New In 3.6.13
6
26
 
7
27
  - Adds a native spec-driven `feature` workflow for durable `spec.md`, `plan.md`,
package/README.md CHANGED
@@ -18,7 +18,7 @@ state, handoffs, and durable task outcomes.
18
18
  ```bash
19
19
  npx -y create-snipara@latest init --client cursor --starter
20
20
  npx -y snipara-companion session-bootstrap --include-session-context --max-context-tokens 1000
21
- npx -y snipara-companion impact src/auth/session.ts --source local
21
+ npx -y snipara-companion code impact --changed-files src/auth/session.ts --source local
22
22
  npx -y snipara-companion source init .
23
23
  ```
24
24
 
@@ -106,7 +106,7 @@ These commands are useful without hosted Snipara:
106
106
  | Command | What it gives you locally |
107
107
  | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
108
108
  | `source init` / `source sync` / `source status` | Local source snapshot, document preview, and code overlay |
109
- | `impact` / `code impact` | Bounded transitive blast radius, chains, and explainable local risk |
109
+ | `code impact` (`impact` alias) / `code local impact` | Bounded transitive blast radius, chains, and explainable local risk |
110
110
  | `reality-check` | Intent Ledger, Unknown Registry, auto-linked context, and inspectable proof |
111
111
  | `code callers` / `imports` / `neighbors` / `shortest-path` | Structural repo questions from local files |
112
112
  | `workflow start` / `phase-start` / `phase-commit` / `resume` | Agent continuity that survives compaction |
@@ -125,6 +125,32 @@ These commands are useful without hosted Snipara:
125
125
  | `intelligence ledger-export` | Structured redacted ledger JSON for replay and review |
126
126
  | `stuck-guard`, `memory-guard`, `pre-tool`, `post-tool` | Fail-soft local guards and hook helpers |
127
127
 
128
+ ### Canonical command forms
129
+
130
+ Use the exact CLI value after `workflow run --mode`:
131
+
132
+ | CLI value | Guide label | Meaning |
133
+ | ------------- | ------------------- | --------------------------------------------------------------------- |
134
+ | `lite` | LITE | Small, known-scope work with no mandatory hosted context call |
135
+ | `standard` | STANDARD | Normal work with context and code-graph follow-up when needed |
136
+ | `auto` | AUTO | Routes by task intent to `lite`, `standard`, `full`, or `orchestrate` |
137
+ | `full` | FULL | Managed, phased work with durable context and plan support |
138
+ | `orchestrate` | FULL + ORCHESTRATED | Explicit deeper orchestration for multi-agent or proof-gate work |
139
+
140
+ The root `run` command is the Project Intelligence judgment/release flow.
141
+ `workflow run` is the workflow-mode runner. They share a verb but are not
142
+ aliases.
143
+
144
+ Use `code impact` as the canonical impact gate. The root `impact` command is a
145
+ compatibility alias, while `code local impact` is the separate non-canonical
146
+ local-overlay query. Use `final-commit` as the canonical final workflow
147
+ closeout; `workflow final-commit` remains a compatibility alias. `task-commit`
148
+ captures a durable task outcome, and `workflow phase-commit` records one
149
+ managed phase and advances the workflow; these are distinct operations.
150
+
151
+ For a public, copy/paste-oriented table, see the
152
+ [Companion CLI Command Reference](https://www.snipara.com/docs/integration/companion/reference).
153
+
128
154
  ### Spec-driven feature workflow
129
155
 
130
156
  Companion provides a native Spec Kit-style preparation layer without creating a
@@ -506,14 +532,14 @@ or ahead work; `--source local` remains completely offline.
506
532
  Use `npx` for one-off checks:
507
533
 
508
534
  ```bash
509
- npx -y snipara-companion impact src/auth/session.ts --source local
535
+ npx -y snipara-companion code impact --changed-files src/auth/session.ts --source local
510
536
  ```
511
537
 
512
538
  Install globally only if you use it every day:
513
539
 
514
540
  ```bash
515
541
  npm install -g snipara-companion
516
- snipara-companion impact src/auth/session.ts
542
+ snipara-companion code impact --changed-files src/auth/session.ts
517
543
  snipara-companion workflow resume
518
544
  ```
519
545
 
package/dist/index.d.ts CHANGED
@@ -89,6 +89,31 @@ interface ContextQueryResult {
89
89
  };
90
90
  }
91
91
  type ContextQuerySearchMode = "keyword" | "semantic" | "hybrid";
92
+ type MinimumChangeMode = "off" | "review";
93
+ type MinimumChangeEvidenceStatus = "confirmed" | "candidate" | "unknown" | "not_applicable" | "needs_review";
94
+ interface MinimumChangeEvidenceCheck {
95
+ status: MinimumChangeEvidenceStatus;
96
+ source?: "code_impact" | "git_diff" | "lockfile" | "manifest" | "runtime" | "test_runner" | "caller_assertion";
97
+ evidence?: Array<string | number | boolean | Record<string, unknown>>;
98
+ scope?: string;
99
+ observed_at?: string;
100
+ confidence?: number;
101
+ }
102
+ interface MinimumChangeEvidence {
103
+ existing_capability?: MinimumChangeEvidenceCheck;
104
+ stdlib_or_native?: MinimumChangeEvidenceCheck;
105
+ installed_dependency?: MinimumChangeEvidenceCheck;
106
+ smallest_safe_diff?: MinimumChangeEvidenceCheck;
107
+ validation_surface?: MinimumChangeEvidenceCheck;
108
+ preservation?: {
109
+ validation?: MinimumChangeEvidenceCheck;
110
+ error_contract?: MinimumChangeEvidenceCheck;
111
+ security_auth?: MinimumChangeEvidenceCheck;
112
+ accessibility?: MinimumChangeEvidenceCheck;
113
+ public_contract?: MinimumChangeEvidenceCheck;
114
+ tests?: MinimumChangeEvidenceCheck;
115
+ };
116
+ }
92
117
  interface ContextQueryOptions {
93
118
  searchMode?: ContextQuerySearchMode;
94
119
  includeMetadata?: boolean;
@@ -97,6 +122,8 @@ interface ContextQueryOptions {
97
122
  includeSharedContext?: boolean;
98
123
  includeAllTiers?: boolean;
99
124
  returnReferences?: boolean;
125
+ minimumChangeMode?: MinimumChangeMode;
126
+ minimumChangeEvidence?: MinimumChangeEvidence;
100
127
  }
101
128
  interface AnswerPackSource {
102
129
  title?: string;
@@ -125,6 +152,7 @@ interface AnswerPack {
125
152
  graph_context_included?: boolean;
126
153
  impact_hint?: string | null;
127
154
  };
155
+ minimum_safe_change?: Record<string, unknown>;
128
156
  token_count?: number;
129
157
  }
130
158
  interface HostedContextControlDiffResponse {
@@ -1141,6 +1169,8 @@ declare class RLMClient {
1141
1169
  direction?: "in" | "out" | "both";
1142
1170
  edgeKinds?: string[];
1143
1171
  limit?: number;
1172
+ minimumChangeMode?: MinimumChangeMode;
1173
+ minimumChangeEvidence?: MinimumChangeEvidence;
1144
1174
  }): Promise<Record<string, unknown>>;
1145
1175
  /**
1146
1176
  * Track accessed files using snipara_remember
@@ -2198,6 +2228,7 @@ declare function writeLocalCodeOverlayCache(manifest: LocalCodeOverlayManifest):
2198
2228
  declare function readLocalCodeOverlayCache(cwd?: string): LocalCodeOverlayManifest | null;
2199
2229
  declare function writeLocalCodePromotionState(state: LocalCodePromotionState): string;
2200
2230
  declare function readLocalCodePromotionState(cwd?: string): LocalCodePromotionState | null;
2231
+ declare function resolveMinimumChangeMode(value: unknown): MinimumChangeMode;
2201
2232
  declare function resolveCodeGraphMode(args: {
2202
2233
  requested: CodeGraphSource;
2203
2234
  dirtyFiles: string[];
@@ -5373,4 +5404,4 @@ declare function installAutomationBundle(args: {
5373
5404
  }): Promise<AutomationInstallResult>;
5374
5405
  declare function getAutomationStatus(projectDir?: string): AutomationStatusResult;
5375
5406
 
5376
- export { AGENT_CONTEXT_EVIDENCE_DEFAULT_LEDGER, AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, CODING_INTELLIGENCE_LEDGER_VERSION, COLLABORATION_STATE_RELATIVE_PATH, ENGINEERING_LEAD_EXECUTION_RECEIPT_STAGES, ENGINEERING_LEAD_EXECUTION_RECEIPT_STATUSES, ENGINEERING_LEAD_POSTURES, ENGINEERING_LEAD_PROOF_VERIFICATION_SOURCES, ENGINEERING_LEAD_PROOF_VERIFICATION_STATUSES, ENGINEERING_LEAD_ROUTING_MODES, ENGINEERING_LEAD_STATUSES, ENGINEERING_LEAD_SUPERVISION_STATUSES, ENGINEERING_LEAD_WORKER_ROLES, ENGINEERING_LEAD_WORK_PACKAGE_STATUSES, FEATURE_DEFAULT_OUTPUT_DIR, FEATURE_WORK_ITEM_VERSION, FINAL_COMMIT_REPORT_RELATIVE_PATH, FINAL_COMMIT_REPORT_VERSION, MEMORY_GUARD_CONTEXT_TIMEOUT_MS, MEMORY_GUARD_RECALL_TIMEOUT_MS, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, POLICY_LEDGER_SYNC_REPORT_VERSION, PRODUCER_LOOP_ARTIFACT_VERSION, PRODUCER_LOOP_RELATIVE_DIR, PRODUCER_LOOP_REPORT_VERSION, TEAM_SYNC_STATE_RELATIVE_PATH, WHY_OUTCOME_CAPTURE_VERSION, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, addLocalWorker, agentContextEvidenceCollectCommand, agentContextEvidenceRecordCommand, agentContextEvidenceStatusCommand, agentContextEvidenceTemplateCommand, agentContextResolveCommand, agentContextValidateCommand, agentReadinessAuditCommand, appendActivityEvent, applyLocalContextMutationPlan, applyManagedWorkflowPolicyAutoResponses, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCodingIntelligenceLedger, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCommitResultMetadata, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildFeaturePlanMarkdown, buildFeatureSpecMarkdown, buildFeatureTasksMarkdown, buildFinalCommitReport, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalAgentContextValidationReport, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextMutationPlan, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalProjectContextValidationReport, buildLocalProjectDriftReport, buildLocalProjectRealityCheck, buildLocalProjectRealityCheckWithAutoContext, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildPolicyLedgerSyncReport, buildProducerLoopReport, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapBrief, buildSessionBootstrapQuality, buildSessionSnapshot, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWhyOutcomeCaptureReport, buildWorkerTrustCandidates, buildWorkflowImpactGate, buildWorkflowPhaseCommitReceipt, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, captureStandaloneCommitWhy, categoryFromGuardTag, classifyToolResult, cleanContextPacks, codingLedgerExportCommand, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectPolicyLedgerSyncArtifacts, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, compareLocalSourceSnapshots, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextControlApplyCommand, contextControlDriftCommand, contextControlHostedApplyCommand, contextControlHostedDiffCommand, contextControlPlanCommand, contextControlValidateCommand, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, controlledWorkerExecuteCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, deriveManagedWorkflowJudgmentResolution, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, featureInitCommand, featurePlanCommand, featureSpecifyCommand, featureStartCommand, featureStatusCommand, featureTasksCommand, formatAgentContextResolution, formatAgentReadinessAuditReport, formatCompanionEngineeringLeadPlanReport, formatFinalCommitReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getLocalSourceSnapshotPath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, hasActiveManagedWorkflow, hashWorkerProfile, ingestReferences, installAutomationBundle, leadPlanCommand, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, memoryReviewsCommand, mergeHybridCodeResults, normalizeCollaborationFiles, normalizeFeatureSlug, normalizeGuardTag, normalizeWorkflowPlanInput, outcomeCapturePreviewCommand, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readActivityTimeline, readAgentContextEvidenceLedger, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, readSessionSnapshot, readStandaloneCommitEvidence, readWorkerTrustEvent, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveAutoWorkflowMode, resolveCodeGraphMode, resolveContextPackRecord, resolveFeatureArtifactPaths, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldFailCollaborationGuard, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workerTrustCandidateCommand, workerTrustReviewCommand, workerTrustStatusCommand, workersLocalAddCommand, workersLocalListCommand, workersLocalProbePrintCommand, workersLocalRemoveCommand, workersLocalStatusCommand, workflowSyncPolicyLedgerCommand, writeFinalCommitReport, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact, writeSessionSnapshot };
5407
+ export { AGENT_CONTEXT_EVIDENCE_DEFAULT_LEDGER, AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, CODING_INTELLIGENCE_LEDGER_VERSION, COLLABORATION_STATE_RELATIVE_PATH, ENGINEERING_LEAD_EXECUTION_RECEIPT_STAGES, ENGINEERING_LEAD_EXECUTION_RECEIPT_STATUSES, ENGINEERING_LEAD_POSTURES, ENGINEERING_LEAD_PROOF_VERIFICATION_SOURCES, ENGINEERING_LEAD_PROOF_VERIFICATION_STATUSES, ENGINEERING_LEAD_ROUTING_MODES, ENGINEERING_LEAD_STATUSES, ENGINEERING_LEAD_SUPERVISION_STATUSES, ENGINEERING_LEAD_WORKER_ROLES, ENGINEERING_LEAD_WORK_PACKAGE_STATUSES, FEATURE_DEFAULT_OUTPUT_DIR, FEATURE_WORK_ITEM_VERSION, FINAL_COMMIT_REPORT_RELATIVE_PATH, FINAL_COMMIT_REPORT_VERSION, MEMORY_GUARD_CONTEXT_TIMEOUT_MS, MEMORY_GUARD_RECALL_TIMEOUT_MS, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, POLICY_LEDGER_SYNC_REPORT_VERSION, PRODUCER_LOOP_ARTIFACT_VERSION, PRODUCER_LOOP_RELATIVE_DIR, PRODUCER_LOOP_REPORT_VERSION, TEAM_SYNC_STATE_RELATIVE_PATH, WHY_OUTCOME_CAPTURE_VERSION, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, addLocalWorker, agentContextEvidenceCollectCommand, agentContextEvidenceRecordCommand, agentContextEvidenceStatusCommand, agentContextEvidenceTemplateCommand, agentContextResolveCommand, agentContextValidateCommand, agentReadinessAuditCommand, appendActivityEvent, applyLocalContextMutationPlan, applyManagedWorkflowPolicyAutoResponses, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCodingIntelligenceLedger, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCommitResultMetadata, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildFeaturePlanMarkdown, buildFeatureSpecMarkdown, buildFeatureTasksMarkdown, buildFinalCommitReport, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalAgentContextValidationReport, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextMutationPlan, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalProjectContextValidationReport, buildLocalProjectDriftReport, buildLocalProjectRealityCheck, buildLocalProjectRealityCheckWithAutoContext, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildPolicyLedgerSyncReport, buildProducerLoopReport, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapBrief, buildSessionBootstrapQuality, buildSessionSnapshot, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWhyOutcomeCaptureReport, buildWorkerTrustCandidates, buildWorkflowImpactGate, buildWorkflowPhaseCommitReceipt, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, captureStandaloneCommitWhy, categoryFromGuardTag, classifyToolResult, cleanContextPacks, codingLedgerExportCommand, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectPolicyLedgerSyncArtifacts, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, compareLocalSourceSnapshots, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextControlApplyCommand, contextControlDriftCommand, contextControlHostedApplyCommand, contextControlHostedDiffCommand, contextControlPlanCommand, contextControlValidateCommand, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, controlledWorkerExecuteCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, deriveManagedWorkflowJudgmentResolution, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, featureInitCommand, featurePlanCommand, featureSpecifyCommand, featureStartCommand, featureStatusCommand, featureTasksCommand, formatAgentContextResolution, formatAgentReadinessAuditReport, formatCompanionEngineeringLeadPlanReport, formatFinalCommitReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getLocalSourceSnapshotPath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, hasActiveManagedWorkflow, hashWorkerProfile, ingestReferences, installAutomationBundle, leadPlanCommand, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, memoryReviewsCommand, mergeHybridCodeResults, normalizeCollaborationFiles, normalizeFeatureSlug, normalizeGuardTag, normalizeWorkflowPlanInput, outcomeCapturePreviewCommand, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readActivityTimeline, readAgentContextEvidenceLedger, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, readSessionSnapshot, readStandaloneCommitEvidence, readWorkerTrustEvent, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveAutoWorkflowMode, resolveCodeGraphMode, resolveContextPackRecord, resolveFeatureArtifactPaths, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveMinimumChangeMode, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldFailCollaborationGuard, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workerTrustCandidateCommand, workerTrustReviewCommand, workerTrustStatusCommand, workersLocalAddCommand, workersLocalListCommand, workersLocalProbePrintCommand, workersLocalRemoveCommand, workersLocalStatusCommand, workflowSyncPolicyLedgerCommand, writeFinalCommitReport, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact, writeSessionSnapshot };
package/dist/index.js CHANGED
@@ -253,6 +253,7 @@ __export(index_exports, {
253
253
  resolveFeatureArtifactPaths: () => resolveFeatureArtifactPaths,
254
254
  resolveFullWorkflowTokenBudget: () => resolveFullWorkflowTokenBudget,
255
255
  resolveLocalWorkerRoutingDefaults: () => resolveLocalWorkerRoutingDefaults,
256
+ resolveMinimumChangeMode: () => resolveMinimumChangeMode,
256
257
  resolveQueryFromToolInput: () => resolveQueryFromToolInput,
257
258
  retrieveContextPack: () => retrieveContextPack,
258
259
  runMemoryGuardCheck: () => runMemoryGuardCheck,
@@ -975,7 +976,9 @@ var RLMClient = class {
975
976
  auto_decompose: options.autoDecompose,
976
977
  include_shared_context: options.includeSharedContext,
977
978
  include_all_tiers: options.includeAllTiers,
978
- return_references: options.returnReferences
979
+ return_references: options.returnReferences,
980
+ minimum_change_mode: options.minimumChangeMode ?? "off",
981
+ minimum_change_evidence: options.minimumChangeEvidence
979
982
  });
980
983
  return {
981
984
  sections: (result.sections || []).map((s) => ({
@@ -1072,7 +1075,9 @@ var RLMClient = class {
1072
1075
  depth: options.depth ?? 3,
1073
1076
  direction: options.direction ?? "both",
1074
1077
  edge_kinds: options.edgeKinds,
1075
- limit: options.limit ?? 50
1078
+ limit: options.limit ?? 50,
1079
+ minimum_change_mode: options.minimumChangeMode ?? "off",
1080
+ minimum_change_evidence: options.minimumChangeEvidence
1076
1081
  });
1077
1082
  }
1078
1083
  /**
@@ -5328,6 +5333,11 @@ function resolveRequestedCodeGraphSource(value) {
5328
5333
  }
5329
5334
  throw new Error("--source must be one of: auto, local, hosted, hybrid");
5330
5335
  }
5336
+ function resolveMinimumChangeMode(value) {
5337
+ if (value === void 0 || value === null || value === "") return "off";
5338
+ if (value === "off" || value === "review") return value;
5339
+ throw new Error("--minimum-change-mode must be one of: off, review");
5340
+ }
5331
5341
  function resolveCodeGraphMode(args) {
5332
5342
  if (args.fallbackHosted && args.requested !== "hosted") {
5333
5343
  return args.hostedConfigured ? { selected: "hybrid_graph", reason: "fallback_hosted_requested" } : { selected: "local_overlay", reason: "fallback_hosted_not_configured" };
@@ -5484,6 +5494,7 @@ function mergeHybridCodeResults(verb, localResult, hostedResult, hostedError) {
5484
5494
  );
5485
5495
  const coverageGaps = mergeResultArrays([hosted, local], ["coverage_gaps", "coverageGaps"]);
5486
5496
  const warnings = mergeResultArrays([hosted, local], ["warnings"]);
5497
+ const minimumSafeChange = hosted.minimum_safe_change ?? hosted.minimumSafeChange ?? local.minimum_safe_change;
5487
5498
  return {
5488
5499
  title: `Hybrid ${verb}`,
5489
5500
  mode: hostedError ? "hybrid_degraded_local" : "hybrid",
@@ -5506,6 +5517,7 @@ function mergeHybridCodeResults(verb, localResult, hostedResult, hostedError) {
5506
5517
  recommended_actions: recommendedActions,
5507
5518
  coverage_gaps: coverageGaps,
5508
5519
  warnings,
5520
+ ...minimumSafeChange ? { minimum_safe_change: minimumSafeChange } : {},
5509
5521
  ...hosted.index_freshness !== void 0 ? { index_freshness: hosted.index_freshness } : {},
5510
5522
  ...hosted.impact !== void 0 ? { impact: hosted.impact } : {},
5511
5523
  local: localResult,
@@ -5587,7 +5599,9 @@ async function callHostedCodeTool(verb, options) {
5587
5599
  depth: options.depth,
5588
5600
  direction: traversalDirection(options.direction),
5589
5601
  edgeKinds: options.edgeKinds,
5590
- limit: options.limit
5602
+ limit: options.limit,
5603
+ minimumChangeMode: options.minimumChangeMode,
5604
+ minimumChangeEvidence: options.minimumChangeEvidence
5591
5605
  });
5592
5606
  }
5593
5607
  }
@@ -20469,7 +20483,22 @@ function buildCollaborationGitHookBlock(hookName) {
20469
20483
  " fi",
20470
20484
  " }",
20471
20485
  ` snipara_companion_hook collaboration claim --resource SURFACE:checkout-git-write --mode EXCLUSIVE --ttl-seconds 300 --reason "${profile} git write" --json >/dev/null || true`,
20472
- ` snipara_companion_hook collaboration guard --profile ${profile} --action ${profile} --resource SURFACE:checkout-git-write --enforce --json >/dev/null`,
20486
+ " snipara_companion_guard() {",
20487
+ ` snipara_companion_hook collaboration guard --profile ${profile} --action ${profile} --resource SURFACE:checkout-git-write --enforce "$@" --json >/dev/null`,
20488
+ " }",
20489
+ ' if [ "${SNIPARA_COLLABORATION_GUARD_ACK_REVIEW_ONLY:-0}" = "1" ]; then',
20490
+ " snipara_companion_guard --ack-review-only",
20491
+ " snipara_guard_status=$?",
20492
+ ' if [ "$snipara_guard_status" -eq 0 ]; then',
20493
+ " snipara_companion_guard",
20494
+ " snipara_guard_status=$?",
20495
+ " fi",
20496
+ ' if [ "$snipara_guard_status" -ne 0 ]; then',
20497
+ ' exit "$snipara_guard_status"',
20498
+ " fi",
20499
+ " else",
20500
+ " snipara_companion_guard",
20501
+ " fi",
20473
20502
  "fi",
20474
20503
  collaborationHookBlockMarker(hookName, "end")
20475
20504
  ].join("\n");
@@ -32606,6 +32635,8 @@ async function queryCommand(options) {
32606
32635
  const result = await client.queryContext(options.query, options.maxTokens || 8e3, {
32607
32636
  searchMode,
32608
32637
  includeAnswerPack: options.includeAnswerPack,
32638
+ minimumChangeMode: options.minimumChangeMode,
32639
+ minimumChangeEvidence: options.minimumChangeEvidence,
32609
32640
  autoDecompose: options.autoDecompose,
32610
32641
  includeSharedContext: options.includeSharedContext
32611
32642
  });
@@ -43943,7 +43974,7 @@ program.command("memory-guard").description(
43943
43974
  );
43944
43975
  program.command("query").description(
43945
43976
  "Search project documents, parsed files, and current truth through hosted Snipara context"
43946
- ).requiredOption("-q, --query <query>", "Search query").option("-m, --max-tokens <number>", "Maximum tokens", "8000").option("--search-mode <mode>", "Search mode: keyword|semantic|hybrid", "hybrid").option("--timeout-ms <number>", "Hosted context query timeout in milliseconds", "30000").option("--no-answer-pack", "Skip Answer Pack generation").option("--no-auto-decompose", "Disable automatic query decomposition").option("--no-shared-context", "Exclude linked shared context").option(
43977
+ ).requiredOption("-q, --query <query>", "Search query").option("-m, --max-tokens <number>", "Maximum tokens", "8000").option("--search-mode <mode>", "Search mode: keyword|semantic|hybrid", "hybrid").option("--timeout-ms <number>", "Hosted context query timeout in milliseconds", "30000").option("--no-answer-pack", "Skip Answer Pack generation").option("--minimum-change-mode <mode>", "off|review (opt-in non-blocking review)", "off").option("--no-auto-decompose", "Disable automatic query decomposition").option("--no-shared-context", "Exclude linked shared context").option(
43947
43978
  "--follow-recommendation",
43948
43979
  "Automatically execute the recommended structural tool when Snipara returns one"
43949
43980
  ).option("--json", "Print raw JSON").action(async (options) => {
@@ -43953,6 +43984,7 @@ program.command("query").description(
43953
43984
  searchMode: options.searchMode,
43954
43985
  timeoutMs: parseInt(options.timeoutMs, 10),
43955
43986
  includeAnswerPack: options.answerPack !== false,
43987
+ minimumChangeMode: resolveMinimumChangeMode(options.minimumChangeMode),
43956
43988
  autoDecompose: options.autoDecompose !== false,
43957
43989
  includeSharedContext: options.sharedContext !== false,
43958
43990
  followRecommendation: Boolean(options.followRecommendation),
@@ -45264,7 +45296,7 @@ collaboration.command("ide-status").description("Print compact JSON status for I
45264
45296
  json: options.json
45265
45297
  });
45266
45298
  });
45267
- program.command("impact").description("Run bounded code impact with automatic local, hosted, or hybrid source selection").argument("[filePath]", "Source file to analyze").option("-q, --qualified-name <qualifiedName>", "Qualified symbol name").option("--symbol-key <symbolKey>", "Stable graph symbol key").option("-f, --file-path <filePath>", "Source file to analyze").option("--changed-files <changedFiles...>", "Changed files to analyze").option("--diff-summary <diffSummary>", "Natural-language summary of the change").option("-d, --depth <number>", "Transitive traversal depth", "3").option("--transitive", "Enable transitive traversal (enabled by default)").option("--direction <direction>", "in|out|both", "both").option("-e, --edge-kinds <edgeKinds...>", "Edge kinds to traverse").option("--max-nodes <number>", "Maximum graph nodes to visit", "500").option("-l, --limit <number>", "Maximum impact entries", "50").option("--source <source>", "auto|local|hosted|hybrid", "auto").option("--fallback-hosted", "Augment the local result with hosted graph context").option("--cached", "When local is selected, use the cached overlay if present").option("--max-files <number>", "Maximum supported code files for local overlay", "2000").option("--json", "Print raw JSON").action(async (filePath, options) => {
45299
+ program.command("impact").description("Run bounded code impact with automatic local, hosted, or hybrid source selection").argument("[filePath]", "Source file to analyze").option("-q, --qualified-name <qualifiedName>", "Qualified symbol name").option("--symbol-key <symbolKey>", "Stable graph symbol key").option("-f, --file-path <filePath>", "Source file to analyze").option("--changed-files <changedFiles...>", "Changed files to analyze").option("--diff-summary <diffSummary>", "Natural-language summary of the change").option("-d, --depth <number>", "Transitive traversal depth", "3").option("--transitive", "Enable transitive traversal (enabled by default)").option("--direction <direction>", "in|out|both", "both").option("-e, --edge-kinds <edgeKinds...>", "Edge kinds to traverse").option("--max-nodes <number>", "Maximum graph nodes to visit", "500").option("-l, --limit <number>", "Maximum impact entries", "50").option("--source <source>", "auto|local|hosted|hybrid", "auto").option("--minimum-change-mode <mode>", "off|review (opt-in non-blocking review)", "off").option("--fallback-hosted", "Augment the local result with hosted graph context").option("--cached", "When local is selected, use the cached overlay if present").option("--max-files <number>", "Maximum supported code files for local overlay", "2000").option("--json", "Print raw JSON").action(async (filePath, options) => {
45268
45300
  await codeGraphAutoSourceCommand("impact", {
45269
45301
  qualifiedName: options.qualifiedName,
45270
45302
  symbolKey: options.symbolKey,
@@ -45278,6 +45310,7 @@ program.command("impact").description("Run bounded code impact with automatic lo
45278
45310
  maxNodes: parseInt(options.maxNodes, 10),
45279
45311
  limit: parseInt(options.limit, 10),
45280
45312
  source: options.source,
45313
+ minimumChangeMode: resolveMinimumChangeMode(options.minimumChangeMode),
45281
45314
  fallbackHosted: Boolean(options.fallbackHosted),
45282
45315
  cached: Boolean(options.cached),
45283
45316
  maxFiles: parseInt(options.maxFiles, 10),
@@ -45529,7 +45562,7 @@ code.addCommand(
45529
45562
  });
45530
45563
  })
45531
45564
  ).addCommand(
45532
- new import_commander.Command("impact").description("Run the primary agent-ready code impact gate with automatic source selection").argument("[filePath]", "Source file to analyze").option("-q, --qualified-name <qualifiedName>", "Qualified symbol name").option("--symbol-key <symbolKey>", "Stable graph symbol key").option("-f, --file-path <filePath>", "Source file to analyze").option("--changed-files <changedFiles...>", "Changed files to analyze").option("--diff-summary <diffSummary>", "Natural-language summary of the change").option("-d, --depth <number>", "Transitive traversal depth", "3").option("--transitive", "Enable transitive traversal (enabled by default)").option("--direction <direction>", "in|out|both", "both").option("-e, --edge-kinds <edgeKinds...>", "Edge kinds to traverse").option("--max-nodes <number>", "Maximum graph nodes to visit", "500").option("-l, --limit <number>", "Maximum impact entries", "50").option("--source <source>", "auto|local|hosted|hybrid", "auto").option("--fallback-hosted", "Augment the local result with hosted graph context").option("--cached", "When local is selected, use the cached overlay if present").option("--max-files <number>", "Maximum supported code files for local overlay", "2000").option("--json", "Print raw JSON").action(async (filePath, options) => {
45565
+ new import_commander.Command("impact").description("Run the primary agent-ready code impact gate with automatic source selection").argument("[filePath]", "Source file to analyze").option("-q, --qualified-name <qualifiedName>", "Qualified symbol name").option("--symbol-key <symbolKey>", "Stable graph symbol key").option("-f, --file-path <filePath>", "Source file to analyze").option("--changed-files <changedFiles...>", "Changed files to analyze").option("--diff-summary <diffSummary>", "Natural-language summary of the change").option("-d, --depth <number>", "Transitive traversal depth", "3").option("--transitive", "Enable transitive traversal (enabled by default)").option("--direction <direction>", "in|out|both", "both").option("-e, --edge-kinds <edgeKinds...>", "Edge kinds to traverse").option("--max-nodes <number>", "Maximum graph nodes to visit", "500").option("-l, --limit <number>", "Maximum impact entries", "50").option("--source <source>", "auto|local|hosted|hybrid", "auto").option("--minimum-change-mode <mode>", "off|review (opt-in non-blocking review)", "off").option("--fallback-hosted", "Augment the local result with hosted graph context").option("--cached", "When local is selected, use the cached overlay if present").option("--max-files <number>", "Maximum supported code files for local overlay", "2000").option("--json", "Print raw JSON").action(async (filePath, options) => {
45533
45566
  await codeGraphAutoSourceCommand("impact", {
45534
45567
  qualifiedName: options.qualifiedName,
45535
45568
  symbolKey: options.symbolKey,
@@ -45543,6 +45576,7 @@ code.addCommand(
45543
45576
  maxNodes: parseInt(options.maxNodes, 10),
45544
45577
  limit: parseInt(options.limit, 10),
45545
45578
  source: options.source,
45579
+ minimumChangeMode: resolveMinimumChangeMode(options.minimumChangeMode),
45546
45580
  fallbackHosted: Boolean(options.fallbackHosted),
45547
45581
  cached: Boolean(options.cached),
45548
45582
  maxFiles: parseInt(options.maxFiles, 10),
@@ -46093,6 +46127,7 @@ if (require.main === module) {
46093
46127
  resolveFeatureArtifactPaths,
46094
46128
  resolveFullWorkflowTokenBudget,
46095
46129
  resolveLocalWorkerRoutingDefaults,
46130
+ resolveMinimumChangeMode,
46096
46131
  resolveQueryFromToolInput,
46097
46132
  retrieveContextPack,
46098
46133
  runMemoryGuardCheck,
@@ -1117,8 +1117,30 @@ durable memory policy locally.
1117
1117
  These commands keep local workflow state moving and call hosted Snipara only
1118
1118
  where the specific command needs hosted context or memory:
1119
1119
 
1120
+ #### Canonical command forms
1121
+
1122
+ `workflow run --mode` accepts exactly these values:
1123
+
1124
+ | CLI value | Guide label | Runtime behavior |
1125
+ | ------------- | ------------------- | --------------------------------------------------------------------- |
1126
+ | `lite` | LITE | Small, known-scope work with no mandatory hosted context call |
1127
+ | `standard` | STANDARD | Normal work with context and code-graph follow-up when needed |
1128
+ | `auto` | AUTO | Routes by task intent to `lite`, `standard`, `full`, or `orchestrate` |
1129
+ | `full` | FULL | Managed, phased work with durable context and plan support |
1130
+ | `orchestrate` | FULL + ORCHESTRATED | Explicit deeper orchestration for multi-agent or proof-gate work |
1131
+
1132
+ The root `run` command is the Project Intelligence judgment/release flow.
1133
+ `workflow run` is the workflow-mode runner; they are different commands.
1134
+ Use root `final-commit` as the canonical final closeout. The registered
1135
+ `workflow final-commit` spelling is a compatibility alias. Similarly,
1136
+ `code impact` is the canonical impact gate, root `impact` is its compatibility
1137
+ alias, and `code local impact` is the separate repository-local overlay query.
1138
+ `task-commit` captures a durable task outcome; `workflow phase-commit`
1139
+ records one managed phase and advances the workflow.
1140
+
1120
1141
  ```bash
1121
1142
  npx -y snipara-companion@latest workflow run --mode standard --query "who imports src.mcp_transport"
1143
+ npx -y snipara-companion@latest workflow run --mode auto --query "map the next bounded change"
1122
1144
  npx -y snipara-companion@latest workflow run --mode full --include-session-context --query "plan the auth refactor"
1123
1145
  npx -y snipara-companion@latest plan --query "plan the auth refactor" --write-plan-file .snipara/workflow/plans/auth-refactor-plan.json
1124
1146
  npx -y snipara-companion@latest task-commit --summary "Shipped auth refactor" --files apps/web/src/lib/auth.ts
@@ -1152,6 +1174,7 @@ snipara-companion workflow producer-review --artifact producer-abc123 --outcome
1152
1174
  snipara-companion final-commit --summary "Shipped auth hardening and tests" --why "Close the reported session replay gap" --evidence "passed:pnpm test auth" --next-step "Review the first 24 hours of telemetry" --files src/auth.ts tests/auth.test.ts
1153
1175
  snipara-companion doctor
1154
1176
  snipara-companion doctor --json
1177
+ snipara-companion collaboration guard --profile pre-deploy --enforce
1155
1178
  snipara-companion code callers --qualified-name src.mcp_transport.handle_call_tool
1156
1179
  snipara-companion code imports --file-path src/mcp_transport.py
1157
1180
  snipara-companion code neighbors --qualified-name src.mcp_transport.handle_call_tool --depth 3
@@ -1675,8 +1698,8 @@ Semantics:
1675
1698
  - `snipara-companion team-sync what-changed` = prints the local state summary and the hosted What Changed For Me response when configured
1676
1699
  - `snipara-companion team-sync sweep` = archives stale local work items after an inactivity threshold; default is 14 days and `--dry-run` previews candidates, actual archive count, and remaining stale work
1677
1700
  - `snipara-companion team-sync resume` = reloads local carryover plus the hosted latest handoff and checkpoint-aware resume guidance when available
1678
- - `snipara-companion final-commit` / `workflow final-commit` = final hosted handoff plus a redacted seven-section closeout report in human output and `.snipara/workflow/final-report.json`; stored phase outcomes, pending Why Capture candidates, non-persisted items, evidence statuses, risks, and the next step remain visibly distinct
1679
- - `snipara-companion code callers/imports/neighbors/shortest-path/impact` = primary code graph surface for agents with shell access. These commands use `--source auto` by default; clean configured checkouts use hosted MCP, dirty/ahead worktrees use a hosted-base plus local-delta hybrid, and unconfigured projects stay local. Every response reports `sourceSelection` and provenance.
1701
+ - `snipara-companion final-commit` (canonical) / `workflow final-commit` (compatibility alias) = final hosted handoff plus a redacted seven-section closeout report in human output and `.snipara/workflow/final-report.json`; stored phase outcomes, pending Why Capture candidates, non-persisted items, evidence statuses, risks, and the next step remain visibly distinct
1702
+ - `snipara-companion code callers/imports/neighbors/shortest-path/impact` = primary code graph surface for agents with shell access. These commands use `--source auto` by default; clean configured checkouts use hosted MCP, dirty/ahead worktrees use a hosted-base plus local-delta hybrid, and unconfigured projects stay local. Every response reports `sourceSelection` and provenance. The canonical impact spelling is `code impact`; root `impact` remains an alias.
1680
1703
  - `snipara-companion code symbol-card` = direct `snipara_code_symbol_card` for an important symbol before editing, with an agent guidance summary before raw JSON
1681
1704
  - `snipara-companion code impact --source hosted|local|hybrid` = optional source override. `--fallback-hosted` augments a local query when hosted auth is available; failures remain explicit degraded-local results.
1682
1705
  - `snipara-companion code local impact` = explicit repository-local bounded transitive impact. TypeScript uses compiler-AST calls/references/imports; Python and Go use import fallback. Use `--depth`, `--direction`, `--edge-kinds`, and `--max-nodes` to control expansion.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snipara-companion",
3
- "version": "3.6.13",
3
+ "version": "3.6.15",
4
4
  "description": "Local-first CLI that asks your repo what breaks before an AI coding agent edits it.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {