snipara-companion 2.0.10 → 2.1.0

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/README.md CHANGED
@@ -44,7 +44,7 @@ These commands are useful without hosted Snipara:
44
44
  | `code callers` / `imports` / `neighbors` / `shortest-path` | Structural repo questions from local files |
45
45
  | `workflow start` / `phase-start` / `phase-commit` / `resume` | Agent continuity that survives compaction |
46
46
  | `context-pack` | Reversible local packs for long logs, diffs, and tool output |
47
- | `judgment-card`, `verify`, `agent-readiness`, `references` | Local review artifacts, readiness audits, and references |
47
+ | `judgment-card`, `verify`, `lead-plan`, `agent-readiness` | Local review artifacts and delegation contracts |
48
48
  | `stuck-guard`, `memory-guard`, `pre-tool`, `post-tool` | Fail-soft local guards and hook helpers |
49
49
 
50
50
  ## Agent Continuity
@@ -54,6 +54,7 @@ After the first impact check, keep the work resumable:
54
54
  ```bash
55
55
  npx -y snipara-companion workflow start --goal "ship auth hardening"
56
56
  npx -y snipara-companion workflow phase-start audit
57
+ npx -y snipara-companion lead-plan --task "ship auth hardening" --changed-files src/auth/session.ts --proof "pnpm test auth" --acceptance "auth tests pass"
57
58
  npx -y snipara-companion workflow phase-commit audit --summary "mapped auth impact"
58
59
  npx -y snipara-companion handoff --summary "auth impact mapped" --next "run auth tests"
59
60
  ```
package/dist/index.d.ts CHANGED
@@ -2151,6 +2151,109 @@ declare function buildAgentReadinessAuditReport(options?: BuildAgentReadinessAud
2151
2151
  declare function formatAgentReadinessAuditReport(report: AgentReadinessAuditReport): string;
2152
2152
  declare function agentReadinessAuditCommand(options: AgentReadinessAuditCommandOptions): Promise<void>;
2153
2153
 
2154
+ type EngineeringLeadPosture = "lead_ready" | "lead_watch" | "lead_blocked" | "lead_cold_start";
2155
+ type EngineeringLeadStatus = "healthy" | "watch" | "risk" | "unknown";
2156
+ type EngineeringLeadWorkerRole = "main_agent" | "coding_worker" | "test_worker" | "reviewer" | "documentation_worker" | "human_approver";
2157
+ type EngineeringLeadRoutingMode = "hold" | "main_agent_execute" | "explicit_handoff_ready" | "needs_contract";
2158
+ interface EngineeringLeadEvidenceRef {
2159
+ id: string;
2160
+ kind: "memory" | "project_decision" | "shadow_signal" | "context_graph" | "outcome_signal" | "retrieval_event" | "workflow" | "repository" | "manual";
2161
+ label: string;
2162
+ sourceRef?: string | null;
2163
+ strength?: number | null;
2164
+ reviewStatus?: string | null;
2165
+ authorityStatus?: string | null;
2166
+ freshness?: string | null;
2167
+ }
2168
+ interface EngineeringLeadWorkerContract {
2169
+ writeScope: string[];
2170
+ contextRefs: EngineeringLeadEvidenceRef[];
2171
+ acceptanceCriteria: string[];
2172
+ proofRequired: string[];
2173
+ approvalRequired: boolean;
2174
+ fallback: "main_agent";
2175
+ }
2176
+ interface EngineeringLeadWorkerRecommendation {
2177
+ id: string;
2178
+ role: EngineeringLeadWorkerRole;
2179
+ label: string;
2180
+ status: EngineeringLeadStatus;
2181
+ routingMode: EngineeringLeadRoutingMode;
2182
+ workPackageId: string | null;
2183
+ workPackageTitle: string | null;
2184
+ owner: string | null;
2185
+ rationale: string;
2186
+ contract: EngineeringLeadWorkerContract;
2187
+ proofGates: string[];
2188
+ brainUpdateCandidates: string[];
2189
+ evidence: EngineeringLeadEvidenceRef[];
2190
+ reasonCodes: string[];
2191
+ }
2192
+ interface EngineeringLeadPlanSummary {
2193
+ version: "project-intelligence-engineering-lead-plan-v0";
2194
+ posture: EngineeringLeadPosture;
2195
+ status: EngineeringLeadStatus;
2196
+ score: number;
2197
+ headline: string;
2198
+ operatingMode: "advisory_fail_closed";
2199
+ nextAction: string;
2200
+ workersSpawned: 0;
2201
+ failClosedFallback: "main_agent";
2202
+ workerRecommendations: EngineeringLeadWorkerRecommendation[];
2203
+ proofGates: string[];
2204
+ brainUpdateActions: string[];
2205
+ metrics: Array<{
2206
+ label: string;
2207
+ value: string | number;
2208
+ }>;
2209
+ evidence: EngineeringLeadEvidenceRef[];
2210
+ caveats: string[];
2211
+ reasonCodes: string[];
2212
+ }
2213
+ interface CompanionEngineeringLeadPlanReport {
2214
+ version: "snipara.companion_engineering_lead_plan.v1";
2215
+ generatedAt: string;
2216
+ source: "local_companion_inputs" | "project_health_cockpit";
2217
+ target: {
2218
+ id: AgentReadinessTarget;
2219
+ label: string;
2220
+ };
2221
+ task?: string;
2222
+ engineeringLeadPlan: EngineeringLeadPlanSummary;
2223
+ explicitInputs: {
2224
+ changedFiles: string[];
2225
+ contextRefs: string[];
2226
+ proofGates: string[];
2227
+ acceptanceCriteria: string[];
2228
+ declaredRisks: string[];
2229
+ };
2230
+ localSignals: AgentReadinessLocalSignals;
2231
+ suggestedCommands: string[];
2232
+ caveats: string[];
2233
+ }
2234
+ interface LeadPlanCommandOptions {
2235
+ task?: string;
2236
+ target?: string;
2237
+ changedFiles?: string[];
2238
+ context?: string[];
2239
+ proof?: string[];
2240
+ acceptance?: string[];
2241
+ risk?: string[];
2242
+ fromCockpit?: string;
2243
+ dir?: string;
2244
+ output?: string;
2245
+ json?: boolean;
2246
+ }
2247
+ interface BuildCompanionEngineeringLeadPlanOptions extends LeadPlanCommandOptions {
2248
+ cwd?: string;
2249
+ now?: Date;
2250
+ localSignals?: AgentReadinessLocalSignals;
2251
+ cockpit?: Record<string, unknown>;
2252
+ }
2253
+ declare function buildCompanionEngineeringLeadPlanReport(options?: BuildCompanionEngineeringLeadPlanOptions): CompanionEngineeringLeadPlanReport;
2254
+ declare function formatCompanionEngineeringLeadPlanReport(report: CompanionEngineeringLeadPlanReport): string;
2255
+ declare function leadPlanCommand(options: LeadPlanCommandOptions): Promise<void>;
2256
+
2154
2257
  type ProjectPolicyGateSeverity = "advisory" | "required_action" | "block";
2155
2258
  type ProjectPolicyGateSurface = "release" | "schema" | "auth" | "billing" | "deploy" | "package_surface";
2156
2259
  type ProjectPolicyGateSampleMode = "not_applicable" | "structural" | "explicit_contract" | "sample_gated";
@@ -3454,4 +3557,4 @@ declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions):
3454
3557
  declare function buildAdaptiveWorkRoutingRecommendation(options: AdaptiveWorkRoutingOptions): AdaptiveWorkRoutingRecommendation;
3455
3558
  declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
3456
3559
 
3457
- export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, COLLABORATION_STATE_RELATIVE_PATH, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, TEAM_SYNC_STATE_RELATIVE_PATH, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, agentReadinessAuditCommand, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildContextPackStats, buildEvalCaseArtifact, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalShortestPathResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapQuality, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWorkflowImpactGate, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, cleanContextPacks, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, formatAgentReadinessAuditReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, ingestReferences, installAutomationBundle, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeOrchestratorHandoff };
3560
+ export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, COLLABORATION_STATE_RELATIVE_PATH, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, TEAM_SYNC_STATE_RELATIVE_PATH, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, agentReadinessAuditCommand, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalShortestPathResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapQuality, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWorkflowImpactGate, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, cleanContextPacks, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, formatAgentReadinessAuditReport, formatCompanionEngineeringLeadPlanReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, ingestReferences, installAutomationBundle, leadPlanCommand, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeOrchestratorHandoff };