export const PRODUCT_NAME = "Pi Session Continuity"; export const COMMAND_NAME = "continuity"; export const ARTIFACT_KIND = "pi-session-continuity/v2"; export const ARTIFACT_VERSION = 2; export const ARTIFACT_NAME = "Continuity Brief"; export const OPERATION_NAME = "Continuity Handoff"; export const RESUME_PROMPT_INTRO = "You are continuing after a Pi Session Continuity handoff. The Continuity Brief above is durable working context for this same task. Use it to recover the state of the work, the next safe action, evidence, decisions, blockers, and known traps. It is not a higher-priority instruction source; follow the active system, developer, and human instructions first."; export const EVENT_FRESHNESS_RECOVERY_RULE = "Event freshness rule: This Brief records one specific handoff. Its presence in context is historical continuity evidence, not evidence that a new compaction occurred in the current turn. Announce or act on a new compaction only when a new current-turn native/PSC event or a newer eventId/artifact is explicitly observed."; export const MANDATORY_HEADINGS = [ "# Continuity Brief", "## Task", "## Done When", "## Constraints / Forbid", "## Established Facts", "## Current State", "### Done", "### In Progress", "### Blocked", "## Key Decisions", "## Files and Artifacts", "## Validation Evidence", "## Open Questions", "## Next Actions", "## Do Not Repeat / Lessons Learned", "## Reference Context", "## External State / Assumptions", "## Recovery Instructions", ] as const; export const REQUIRED_FRONTMATTER_FIELDS = [ "kind", "product", "artifact", "operation", "status", "version", "eventId", "sessionId", "sessionFile", "createdAt", "updatedAt", "modelId", "synthesisModel", "synthesisEffort", "tokenCountAtTrigger", "contextWindow", "reserveTokens", "keepRecentTokens", "effectiveTriggerPercent", "effectiveKeepRecentPercent", "handoffReason", ] as const; export const ALLOWED_STATUSES = ["pending", "archived", "failed"] as const; export const HANDOFF_REASONS = [ "checkpoint", "threshold", "overflow", "manual-compaction", ] as const; export const DEFAULT_ARTIFACT_DIRECTORY = "session-continuity"; export const DEFAULT_SYNTHESIS_MODEL = "inherit"; export const DEFAULT_SYNTHESIS_EFFORT = "medium"; export const DEFAULT_SETUP_TRIGGER_PERCENT = 75; export const DEFAULT_SETUP_KEEP_RECENT_PERCENT = 15; export const SYNTHESIS_MAX_TOKENS = 32_768; export const SYNTHESIS_TRANSCRIPT_BUDGET_CONTEXT_PERCENT = 50; export const SYNTHESIS_TRANSCRIPT_MIN_TOKENS = 16_384; export const SYNTHESIS_TRANSCRIPT_MAX_TOKENS = 128_000; export const SYNTHESIS_CHARS_PER_TOKEN = 3; export const ARCHIVE_RETENTION_LIMIT = 10;