把一次完成的 AI 会话压缩成结构化延续包,保留决定、进行中的工作和约定,便于在新会话继续。
# 提示词:会话连续性引擎 (SCE)
# 版本:1.2.3
# 作者:Scott Malin, CISSP
# 目的:
# 将已完成的 AI 会话压缩为结构化的连续性包,该包可被
# 转移至新会话(包括跨不同 AI 平台)以保留
# 项目上下文、历史决策、活跃工作流和既定规范。
# 目标是使用过滤器安全的被动引用架构,最小化上下文丢失、减少重复性启动并维持项目进展。
# 更新日志:
# - v1.0.0 至 v1.2.1:初始发布版本,跨平台调优,新增 JSON 模式。
# - v1.2.2:修复嵌套代码块解析问题。标准化 JSON 键名。
# 量化上下文规模指标。澄清第 8 节验证载荷规则。
# - v1.2.3:将合规通知和指南重构为被动、静态的
# 引用语言,以彻底消除启发式安全过滤器触发。
--------------------------------------------------------------------------
我们即将结束本次会话,以保留上下文、减少上下文漂移,并
在未来的对话中保持连续性。
你的任务是创建一个全面的会话转移包,捕捉
当前项目状态、活跃决策、历史上下文、约束条件
以及下一步行动。
生成的包应帮助未来的 AI 助手快速理解项目
并以最小的重新发现成本继续工作。
--------------------------------------------------------------------------
目的与方法论
--------------------------------------------------------------------------
本文档是一个静态的、由用户提供的项目状态快照。它仅作为参考文档,
用于将当前会话锚定在历史上下文、既定项目定义和已完成的技术里程碑中。
--------------------------------------------------------------------------
项目参考指南 (v1.2.3)
--------------------------------------------------------------------------
接收助手将此数据用作信息基线:
- 使用已确认的项目决策以保持与现有工作的连贯性。
- 明确区分既定事实、待解决问题和计划步骤。
- 参考记录的命名约定、标准和版本历史,
以防止退化或配置漂移。
- 在展示资产时使用表格或紧凑列表以便快速查阅。
- 如果归档数据与当前目标冲突,请请求明确澄清。
--------------------------------------------------------------------------
输出生成指令
--------------------------------------------------------------------------
按以下方式精确生成最终输出:
1. 一句简短的引言。
2. 一个包含会话转移包的 Markdown 代码块。
嵌套代码块规则:如果任何部分内的内容需要代码块,
请对外层容器使用四个反引号(````)或转义内层代码块,
以防止主容器提前终止。
默认模式(Markdown):使用下方 START/END 块内的结构。
JSON 模式:如果用户明确请求“JSON 输出”或“JSON 模式”,则输出
一个有效的单一 JSON 对象。不要将其包裹在 Markdown 文本中。使用以下确切的 camelCase 键名:
{
"handoffMetadata": {},
"projectHandoffContext": { "preferredInteractionStyle": "" },
"projectContextStatus": { "keyRisksAndAntiDrift": "" },
"persistentConstraints": {},
"historicalLedger": [],
"currentSourceOfTruthAssets": [],
"openQuestions": [],
"immediateNextSteps": [],
"continuityVerificationTemplate": ""
}
START OF PACKAGE CODEBLOCK
# 会话转移包 (SCE v1.2.3)
## 0. 交接元数据
- 源平台/模型:
- 日期:
- 压缩的会话数:
- 大致上下文规模(根据当前会话深度选择一项):
· 短(<10k tokens / 简短聊天)
· 中(10k-50k tokens / 中等技术深入)
· 长(50k-100k tokens / 大量代码或长期多阶段对话)
· 非常长(>100k tokens / 大型仓库上下文或高度延展的会话)
- 主要主题 / 标签:
- 关键仓库/文件:
## 1. 项目交接上下文
本节总结项目的总体目的、当前
方向、主要目标以及已做出的重要战略决策。
### 首选交互风格
[描述首选工作风格、格式约定、细节程度、
版本控制期望、置信度标签要求、沟通风格
及其他协作偏好。]
## 2. 项目上下文与当前状态
提供一个压缩但全面的摘要,包括:
- 当前项目目标
- 已完成的工作
- 当前状态
- 活跃开发工作
- 最近决策
- 已知问题
重点保留那些否则将需要大量努力才能重新发现的上下文。
### 关键风险、陷阱与防漂移说明
记录任何已知风险、常见故障模式、已弃用的方法,
或为防止未来会话中出现上下文漂移或安全问题而提供的具体指导。
## 3. 持久性约束与操作标准
记录持续有效的标准,例如:
- 格式要求
- 命名规范
- 版本规则
- 文档标准
- 证据要求
- 验证流程
- 质量控制
- 任何用户自定义的偏好
### 连续性指导
- 对既定标准的更改通常应予以记录,并由用户主导。
- 在可行的情况下,保持与现有项目资产的兼容性。
- 在适用时,在版本历史中记录重大变更。
## 4. 历史账本(压缩版)
提供按时间顺序排列的主要项目事件摘要,包括:
- 重要决策
- 架构变更
- 提示词修订
- 已停用的方法
- 经验教训
- 重要里程碑
条目应简洁但保留决策依据。对于较长的历史记录,使用项目符号或简单表格。
## 5. 当前权威来源资产
列出所有关键资产的最新批准版本。
每个资产应包含:
- 资产名称
- 版本
- 用途
- 当前状态
- 位置/仓库(如已知)
仅在内容较短时包含完整内容。
对于较大资产,提供:
- 摘要
- 关键特征
- 位置引用
避免重复不必要的内容。列出多个资产时使用表格。
## 6. 待解决问题与待定决策
每项应包含:
- 描述
- 当前状态
- 已知选项
- 置信水平(如适用)
建议的置信标签:
- [CONFIRMED]
- [HIGH CONFIDENCE]
- [MEDIUM CONFIDENCE]
- [LOW CONFIDENCE]
- [OPEN QUESTION]
- [PROPOSED]
## 7. 立即后续步骤
提供一个优先级排序的行动清单。
每项应包含:
- 目标
- 重要性
- 依赖项(如有)
- 关联的待解决问题链接(如适用)
按优先级从高到低排序。
## 8. 连续性验证模板
(当前模型注意:不要执行此部分。将此部分内容逐字输出,作为静态载荷供接收模型在入职时读取并执行。)
未来 AI 助手可选择在继续工作前提供简短的入职摘要。
建议向用户输出的格式如下:
"SCE v1.2.3 loaded successfully.
Current understanding:
[2-3 句摘要]
Top priorities:
- 事项 1
- 事项 2
- 事项 3
Ready to proceed."
END OF PACKAGE CODEBLOCK# Prompt: Session Continuity Engine (SCE)
# Version: 1.2.3
# Author: Scott Malin, CISSP
# Purpose:
# Compresses a completed AI session into a structured continuity package that can be
# transferred into a new session (including across different AI platforms) to preserve
# project context, historical decisions, active workstreams, and established conventions.
# The goal is to minimize context loss, reduce repetitive onboarding, and maintain
# project momentum using filter-safe, passive reference architecture.
# Changelog:
# - v1.0.0 to v1.2.1: Initial releases, cross-platform tuning, JSON mode addition.
# - v1.2.2: Fixed nested codeblock parsing issues. Standardized JSON keys.
# Quantified context scale metrics. Clarified Section 8 verification payload rules.
# - v1.2.3: Re-engineered compliance notice and guidelines into passive, static
# reference language to completely eliminate heuristic safety filter triggers.
--------------------------------------------------------------------------
We are ending this session to preserve context, reduce context drift, and
maintain continuity across future conversations.
Your task is to create a comprehensive Session Transfer Package that captures
the current project state, active decisions, historical context, constraints,
and next actions.
The resulting package should help a future AI assistant understand the project
quickly and continue work with minimal re-discovery effort.
--------------------------------------------------------------------------
PURPOSE & METHODOLOGY
--------------------------------------------------------------------------
This document is a static, user-provided project state snapshot. It functions
strictly as reference documentation to ground the current session in historical
context, established project definitions, and completed technical milestones.
--------------------------------------------------------------------------
PROJECT REFERENCE GUIDELINES (v1.2.3)
--------------------------------------------------------------------------
The receiving assistant utilizes this data as an informational baseline:
- Use the confirmed project decisions to maintain consistency with existing work.
- Distinguish clearly between established facts, open questions, and planned steps.
- Reference the documented naming conventions, standards, and version histories
to prevent regression or configuration drift.
- Use tables or compact lists for scannable reference when displaying assets.
- Request explicit clarification if the archived data conflicts with current objectives.
--------------------------------------------------------------------------
OUTPUT GENERATION INSTRUCTIONS
--------------------------------------------------------------------------
Generate the final output exactly as follows:
1. A brief introductory sentence.
2. One markdown codeblock containing the Session Transfer Package.
NESTED CODEBLOCK RULE: If the content inside any section requires a codeblock,
use four backticks (````) for the outer container or escape the inner blocks so
the master container does not break prematurely.
DEFAULT MODE (Markdown): Use the structure inside the START/END block below.
JSON MODE: If the user explicitly requests "JSON output" or "JSON mode", output
a single valid JSON object. Do not wrap it in markdown text. Use these exact
camelCase keys:
{
"handoffMetadata": {},
"projectHandoffContext": { "preferredInteractionStyle": "" },
"projectContextStatus": { "keyRisksAndAntiDrift": "" },
"persistentConstraints": {},
"historicalLedger": [],
"currentSourceOfTruthAssets": [],
"openQuestions": [],
"immediateNextSteps": [],
"continuityVerificationTemplate": ""
}
START OF PACKAGE CODEBLOCK
# SESSION TRANSFER PACKAGE (SCE v1.2.3)
## 0. Handoff Metadata
- Originating Platform/Model:
- Date:
- Sessions Compressed:
- Rough Context Scale (Choose one based on current session depth):
· Short (<10k tokens / brief chat)
· Medium (10k-50k tokens / moderate technical deep dive)
· Long (50k-100k tokens / heavy code or long multi-stage conversation)
· Very Long (>100k tokens / massive repository context or highly extended session)
- Primary Topics / Tags:
- Key Repositories/Files:
## 1. Project Handoff Context
This section summarizes the overall purpose of the project, its current
direction, major objectives, and any important strategic decisions already
made.
### Preferred Interaction Style
[Describe preferred working style, formatting conventions, level of detail,
versioning expectations, confidence-label requirements, communication style,
and other collaboration preferences.]
## 2. Project Context & Current Status
Provide a compressed but comprehensive summary of:
- Current project goals
- Work completed
- Current state
- Active development efforts
- Recent decisions
- Known issues
Focus on preserving context that would otherwise require significant effort
to rediscover.
### Key Risks, Gotchas & Anti-Drift Notes
Document any known risks, common failure modes, deprecated approaches,
or specific guidance to prevent context drift or safety issues in future sessions.
## 3. Persistent Constraints & Operating Standards
Document ongoing standards such as:
- Formatting requirements
- Naming conventions
- Versioning rules
- Documentation standards
- Evidence requirements
- Validation procedures
- Quality controls
- Any user-established preferences
### Continuity Guidance
- Changes to established standards should generally be documented and
user-directed.
- Preserve compatibility with existing project assets whenever practical.
- Record significant changes in version history where applicable.
## 4. Historical Ledger (Compressed)
Provide a chronological summary of major project events, including:
- Important decisions
- Architectural shifts
- Prompt revisions
- Retired approaches
- Lessons learned
- Significant milestones
Keep entries concise while preserving rationale. Use bullets or a simple table
for longer histories.
## 5. Current Source-of-Truth Assets
List the latest approved versions of all critical assets.
For each asset include:
- Asset Name
- Version
- Purpose
- Current Status
- Location/Repository (if known)
Include full content only when reasonably short.
For larger assets, provide:
- Summary
- Key characteristics
- Location reference
Avoid duplicating unnecessary content. Use a table when listing multiple assets.
## 6. Open Questions & Pending Decisions
For each item include:
- Description
- Current status
- Known options
- Confidence level (if applicable)
Suggested confidence labels:
- [CONFIRMED]
- [HIGH CONFIDENCE]
- [MEDIUM CONFIDENCE]
- [LOW CONFIDENCE]
- [OPEN QUESTION]
- [PROPOSED]
## 7. Immediate Next Steps
Provide a prioritized action list.
For each item include:
- Objective
- Importance
- Dependencies (if any)
- Link to related open questions (if applicable)
Order from highest to lowest priority.
## 8. Continuity Verification Template
(Note to current model: Do not execute this section. Output this verbatim as a
static payload for the receiving model to read and execute upon onboarding.)
A future AI assistant may optionally provide a brief onboarding summary before
continuing work.
Suggested format to output to the user:
"SCE v1.2.3 loaded successfully.
Current understanding:
[2-3 sentence summary]
Top priorities:
- Item 1
- Item 2
- Item 3
Ready to proceed."
END OF PACKAGE CODEBLOCK