@adamchanadam/agent-handoff-kit 0.3.10 → 0.3.12
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 +7 -3
- package/bin/agent-handoff-kit.mjs +61 -46
- package/docs/whatsnew/v0.3.1.md +5 -5
- package/docs/whatsnew/v0.3.11.md +19 -0
- package/docs/whatsnew/v0.3.12.md +19 -0
- package/docs/whatsnew/v0.3.2.md +5 -5
- package/docs/whatsnew/v0.3.3.md +5 -5
- package/docs/whatsnew/v0.3.4.md +2 -2
- package/package.json +1 -1
- package/packs/writing.md +2 -0
- package/runtime-core/AGENTS.core.md +2 -2
- package/runtime-core/PROJECT_INDEX.md +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Handoff Kit
|
|
2
2
|
|
|
3
|
-
狀態:目前版本為 `v0.3.
|
|
3
|
+
狀態:目前版本為 `v0.3.12`。這是早期可用版本,仍在持續完善中。
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -35,6 +35,10 @@ Agent Handoff Kit 是 **AI 對話之間的接力棒**。
|
|
|
35
35
|
|
|
36
36
|
## 三步上手
|
|
37
37
|
|
|
38
|
+

|
|
39
|
+
|
|
40
|
+
這張圖是給第一次使用的人看的流程摘要:先在專案資料夾安裝,然後在 AI 對話中說「教我用」或 `help me start`,完成工作時說「收工」,讓 AI 留下下一次能接上的交接。
|
|
41
|
+
|
|
38
42
|
### 一、安裝
|
|
39
43
|
|
|
40
44
|
在你的專案資料夾打開終端機,執行:
|
|
@@ -116,7 +120,7 @@ START_NEXT_SESSION_PROMPT.txt
|
|
|
116
120
|
npx --yes @adamchanadam/agent-handoff-kit@latest doctor
|
|
117
121
|
```
|
|
118
122
|
|
|
119
|
-
|
|
123
|
+
看到「檢查通過」代表必要文件與基本結構通過檢查。若 `START_NEXT_SESSION_PROMPT.txt` 落後於 `dev/SESSION_HANDOFF.md`,`doctor` 只會提醒;這個便利副本應在收工 closeout 時由 AI 重新生成,不需要在 session 中途手動更新。
|
|
120
124
|
|
|
121
125
|
`doctor` 只檢查,不會建立或修改項目文件。這個檢查只能確認文件齊不齊、格式是否正常,不代表 AI 已理解你的專案。真正開始工作前,仍應把 `Work in ...` 起步句貼到 AI 對話,讓 AI 讀入口文件並說明目前狀態。
|
|
122
126
|
|
|
@@ -257,7 +261,7 @@ Agent Handoff Kit 可與 [Adam-AI-Instructions](https://github.com/prompt-templa
|
|
|
257
261
|
|
|
258
262
|
## 目前限制
|
|
259
263
|
|
|
260
|
-
- 目前版本為 `v0.3.
|
|
264
|
+
- 目前版本為 `v0.3.12`。
|
|
261
265
|
- 這是早期可用版本,仍在持續完善中。
|
|
262
266
|
- 升級合併屬窄範圍策略,不是完整的複雜合併工具。
|
|
263
267
|
- `doctor` 能檢查結構,不能代替 AI 對專案內容的理解。
|
|
@@ -726,23 +726,25 @@ async function runDoctor(root, version, options = {}) {
|
|
|
726
726
|
return "failed";
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
const mirrorRows = await checkPromptMirror(root);
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
729
|
+
const mirrorRows = await checkPromptMirror(root);
|
|
730
|
+
const mirrorBlockingFailures = mirrorRows.filter((row) => !row.ok && row.reason !== "convenience copy differs from dev/SESSION_HANDOFF.md");
|
|
731
|
+
const mirrorWarnings = mirrorRows.filter((row) => !row.ok && row.reason === "convenience copy differs from dev/SESSION_HANDOFF.md");
|
|
732
|
+
console.log(`\nprompt mirror checks: ${mirrorRows.length}`);
|
|
733
|
+
for (const row of mirrorRows) {
|
|
734
|
+
const status = row.ok ? "ok" : row.reason === "convenience copy differs from dev/SESSION_HANDOFF.md" ? "warn" : "missing";
|
|
735
|
+
console.log(`${status} ${row.target} (${row.label})`);
|
|
736
|
+
if (!row.ok && row.reason) console.log(` reason: ${row.reason}`);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if (mirrorBlockingFailures.length > 0) {
|
|
740
|
+
printDoctorSummary(version, root, "needs-fix", {
|
|
741
|
+
checked: rows.length + anchorRows.length + schemaRows.length + mirrorRows.length,
|
|
742
|
+
failedKind: "prompt mirror checks",
|
|
743
|
+
failedCount: mirrorBlockingFailures.length,
|
|
744
|
+
nextStep: "以 dev/SESSION_HANDOFF.md 的 Next Session Opening Message 為準,重生 START_NEXT_SESSION_PROMPT.txt。"
|
|
745
|
+
});
|
|
746
|
+
process.exitCode = 1;
|
|
747
|
+
return "failed";
|
|
746
748
|
}
|
|
747
749
|
|
|
748
750
|
// R-010 SESSION_LOG handoff-role discipline check (warn-only; does not change mode or exit).
|
|
@@ -776,16 +778,21 @@ async function runDoctor(root, version, options = {}) {
|
|
|
776
778
|
const projectAge = await assessProjectAge(root);
|
|
777
779
|
printProjectAge(projectAge);
|
|
778
780
|
const onboardingNextStep = options.context === "upgrade-self-check" ? null : getFirstUseNextStep(root, lastCloseout);
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
781
|
+
const promptMirrorNextStep = mirrorWarnings.length > 0
|
|
782
|
+
? "檢查已通過。START_NEXT_SESSION_PROMPT.txt 只是下次開工便利副本;session 進行中不用手動重生,收工 closeout 時 AI 會從 dev/SESSION_HANDOFF.md 重生。"
|
|
783
|
+
: null;
|
|
784
|
+
|
|
785
|
+
const overallHealthy = credentialResult.ok;
|
|
786
|
+
printDoctorSummary(version, root, overallHealthy ? "healthy" : "needs-attention", {
|
|
787
|
+
checked: rows.length + anchorRows.length + schemaRows.length + mirrorRows.length + 2,
|
|
788
|
+
failedKind: !credentialResult.ok ? "credential leak" : null,
|
|
789
|
+
failedCount: !credentialResult.ok ? credentialResult.findings.length : 0,
|
|
790
|
+
warningKind: mirrorWarnings.length > 0 ? "prompt mirror warning" : null,
|
|
791
|
+
warningCount: mirrorWarnings.length,
|
|
792
|
+
nextStep: !credentialResult.ok
|
|
786
793
|
? "立即從相關檔案 redact credential value + rotate 已泄露 token;credential 應該由 AI 工具自身 secure storage 管理,永不寫入 dev/* 任何檔。"
|
|
787
794
|
: disciplineResult.ok
|
|
788
|
-
? versionNextStep ?? onboardingNextStep ?? "檢查已通過。繼續使用你原本的 AI 開工方式;如剛完成一個任務,記得在 AI 對話輸入「收工」保存交接。"
|
|
795
|
+
? versionNextStep ?? promptMirrorNextStep ?? onboardingNextStep ?? "檢查已通過。繼續使用你原本的 AI 開工方式;如剛完成一個任務,記得在 AI 對話輸入「收工」保存交接。"
|
|
789
796
|
: "繼續使用;下次 closeout 時 AI 應自動執行 SESSION_LOG N 規則推進(見上面 warn 行)。如未動請要求 AI 重做 closeout。"
|
|
790
797
|
});
|
|
791
798
|
return overallHealthy ? "passed" : "failed";
|
|
@@ -843,18 +850,23 @@ async function checkInstalledIntegrationsCredentialLeak(root) {
|
|
|
843
850
|
|
|
844
851
|
// R-026 CLI Output Contract: doctor 完成必含四項(版本/模式/剛完成/下一步)。
|
|
845
852
|
function printDoctorSummary(version, root, mode, details) {
|
|
846
|
-
console.log("");
|
|
847
|
-
if (mode === "healthy") {
|
|
848
|
-
console.log("status: passed");
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
853
|
+
console.log("");
|
|
854
|
+
if (mode === "healthy") {
|
|
855
|
+
console.log("status: passed");
|
|
856
|
+
if (details.warningCount > 0) {
|
|
857
|
+
console.log("✅ 檢查通過:必要文件存在,基本結構完整。");
|
|
858
|
+
console.log("⚠️ 提醒:下次開工提示便利副本目前落後於 handoff;這只需要在收工 closeout 時重生。");
|
|
859
|
+
} else {
|
|
860
|
+
console.log("✅ 檢查通過:必要文件存在,基本結構完整,下次開工提示副本已與 handoff 一致。");
|
|
861
|
+
}
|
|
862
|
+
} else {
|
|
863
|
+
console.log(`status: failed (${details.failedCount} ${details.failedKind} failed)`);
|
|
864
|
+
console.log(`⚠️ 檢查未通過:${details.failedKind === "missing files" ? "有必要檔案不存在。" : details.failedKind === "anchor checks" ? "有檔案存在,但內容缺少必要段落。" : details.failedKind === "schema checks" ? "交接或索引文件結構不完整。" : "下次開工提示副本與 handoff 真源不同。"}`);
|
|
865
|
+
}
|
|
854
866
|
console.log("");
|
|
855
867
|
console.log(`📦 版本:v${version}`);
|
|
856
868
|
console.log(`🩺 模式:${mode}`);
|
|
857
|
-
console.log(`🔎 剛完成:檢查 ${details.checked} 項;${mode === "healthy" ? "全部通過" : `${details.failedCount} 項未通過(${details.failedKind})`}。`);
|
|
869
|
+
console.log(`🔎 剛完成:檢查 ${details.checked} 項;${mode === "healthy" ? (details.warningCount > 0 ? `0 項未通過;${details.warningCount} 項提醒(${details.warningKind})` : "全部通過") : `${details.failedCount} 項未通過(${details.failedKind})`}。`);
|
|
858
870
|
console.log(`🚀 下一步:${details.nextStep}`);
|
|
859
871
|
}
|
|
860
872
|
|
|
@@ -867,7 +879,7 @@ async function hydrateInitialOpeningPrompt(root, created) {
|
|
|
867
879
|
if (!text.includes("<absolute project root>")) continue;
|
|
868
880
|
await writeFile(filePath, text.replaceAll("<absolute project root>", root), "utf8");
|
|
869
881
|
} catch {
|
|
870
|
-
// Leave template untouched; doctor will
|
|
882
|
+
// Leave template untouched; doctor will warn about convenience-copy drift if any.
|
|
871
883
|
}
|
|
872
884
|
}
|
|
873
885
|
}
|
|
@@ -1971,18 +1983,21 @@ function printInstallNextSteps(root, conflictCount, mode = "first-install", skip
|
|
|
1971
1983
|
// R-031 v0.3.1+: Upgrade substantive next-step block. Distinct from install
|
|
1972
1984
|
// (`printInstallNextSteps`) because the user is not first-time; pushing them through
|
|
1973
1985
|
// the onboarding canonical phrase resets context they already have.
|
|
1974
|
-
async function printUpgradeNextSteps(root, conflictCount, version, preUpgradeRootVersion) {
|
|
1975
|
-
console.log("");
|
|
1976
|
-
console.log("============================================================");
|
|
1986
|
+
async function printUpgradeNextSteps(root, conflictCount, version, preUpgradeRootVersion) {
|
|
1987
|
+
console.log("");
|
|
1988
|
+
console.log("============================================================");
|
|
1989
|
+
if (conflictCount > 0) {
|
|
1990
|
+
console.log("⚠️ 升級未完成:有檔案需要人工確認");
|
|
1991
|
+
console.log("============================================================");
|
|
1992
|
+
console.log("⚠️ 狀態:有既有檔案需要人工確認,詳情見 migration report。");
|
|
1993
|
+
console.log("⚠️ 這不是檔案壞掉;工具已停手,沒有覆寫 conflict 檔案。");
|
|
1994
|
+
console.log("📋 下一步:把 migration report 或這段輸出貼給 AI,請它幫你判斷怎樣合併。");
|
|
1995
|
+
console.log("============================================================");
|
|
1996
|
+
return;
|
|
1997
|
+
}
|
|
1977
1998
|
console.log("✅ 升級完成:Kit 檔案已更新到最新版本");
|
|
1978
|
-
console.log("============================================================");
|
|
1979
|
-
|
|
1980
|
-
console.log("⚠️ 狀態:有既有檔案需要人工確認,詳情見 migration report。");
|
|
1981
|
-
console.log("⚠️ 這不是檔案壞掉;工具已停手,沒有覆寫 conflict 檔案。");
|
|
1982
|
-
console.log("📋 下一步:把 migration report 或這段輸出貼給 AI,請它幫你判斷怎樣合併。");
|
|
1983
|
-
console.log("");
|
|
1984
|
-
}
|
|
1985
|
-
// R-031.2 v0.3.2+: Inline whatsnew summary — directly surface what changed in this
|
|
1999
|
+
console.log("============================================================");
|
|
2000
|
+
// R-031.2 v0.3.2+: Inline whatsnew summary — directly surface what changed in this
|
|
1986
2001
|
// version (and any intermediate versions the user skipped).
|
|
1987
2002
|
// R-031.3 v0.3.3+: fromVersion now uses pre-upgrade snapshot (captured before
|
|
1988
2003
|
// inject mutated PROJECT_INDEX), so the range narrative reflects actual user
|
package/docs/whatsnew/v0.3.1.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# v0.3.1
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 本版新加了甚麼
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
改善升級流程的提示文字。完成升級、再次執行 `upgrade`、或沒有任何檔案需要更新時,工具會顯示不同提示,避免把「已經是最新版本」誤說成「安裝完成」。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 對你已有檔案的影響
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
本版只調整工具輸出文字,不會改動既有項目內容,也不會改變已安裝的 Kit 文件結構。
|
|
10
10
|
|
|
11
11
|
## 建議下一步
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
執行 `doctor` 檢查項目健康即可。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# v0.3.11
|
|
2
|
+
|
|
3
|
+
## 本版新加了甚麼
|
|
4
|
+
|
|
5
|
+
本版把 v0.3.10 發佈後留下的用戶旅程檢查補成長期守門。重點不是增加新功能,而是把已驗證的首次安裝、升級、衝突停手與公開文件一致性,轉成每次發佈前都會跑的檢查。
|
|
6
|
+
|
|
7
|
+
## 對你已有檔案的影響
|
|
8
|
+
|
|
9
|
+
既有項目不用重裝。升級時若沒有需要合併的內容,工具不會假裝完成一件大事;若遇到不能安全判斷的衝突,會清楚停手並提示先處理衝突。舊版本升上來時,工具也會保留既有資料與本地規則。
|
|
10
|
+
|
|
11
|
+
## 建議下一步
|
|
12
|
+
|
|
13
|
+
升級前可先預演:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx --yes @adamchanadam/agent-handoff-kit@latest upgrade --dry-run
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
如果預演沒有 conflict,再執行正式升級。升級後可用 `doctor` 檢查項目是否完整;第一次使用的新項目,仍按安裝後顯示的起步句進入 AI 對話。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# v0.3.12
|
|
2
|
+
|
|
3
|
+
## 本版新加了甚麼
|
|
4
|
+
|
|
5
|
+
本版修正 `doctor` 對下次開工提示便利副本的判斷。`dev/SESSION_HANDOFF.md` 仍是權威;`START_NEXT_SESSION_PROMPT.txt` 只是給你下次開工複製用的副本,應在收工 closeout 時重新產生。
|
|
6
|
+
|
|
7
|
+
## 對你已有檔案的影響
|
|
8
|
+
|
|
9
|
+
既有項目不用重裝。若你在一個 session 中途更新了 handoff,但還未收工,`doctor` 不會再因便利副本暫時落後而判定項目失敗。它會提醒你:完成任務後請 AI 執行 closeout,屆時再重生便利副本。
|
|
10
|
+
|
|
11
|
+
## 建議下一步
|
|
12
|
+
|
|
13
|
+
升級前可先預演:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx --yes @adamchanadam/agent-handoff-kit@latest upgrade --dry-run
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
如果預演沒有 conflict,再執行正式升級。升級後可用 `doctor` 檢查;若只有便利副本提醒,繼續工作即可,收工時再讓 AI 保存交接。
|
package/docs/whatsnew/v0.3.2.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# v0.3.2
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 本版新加了甚麼
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`doctor` 和 `init` 會顯示「項目狀態速覽」,包括工具版本、項目記錄版本、npm 最新版本、上次收工時間,以及項目首次安裝距今多久。`upgrade` 完成後也會直接顯示本版重點,讓使用者不必再另外查找更新說明。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 對你已有檔案的影響
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
本版只改善工具提示與狀態顯示,不會改動既有項目內容,也不會改變已安裝的 Kit 文件結構。
|
|
10
10
|
|
|
11
11
|
## 建議下一步
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
執行 `doctor` 檢查項目健康,並留意輸出中的「項目狀態速覽」。
|
package/docs/whatsnew/v0.3.3.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# v0.3.3
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 本版新加了甚麼
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
修正升級後的版本提示矛盾。完成 `upgrade` 後,`doctor` 不應再說項目版本落後於目前工具版本。若使用者從較舊版本直接升級到本版,工具也會提示這次跨度較大,並引導使用者查看 GitHub Release 的完整歷史說明。
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 對你已有檔案的影響
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
本版不會改動使用者填寫的項目內容。`upgrade` 後,`dev/PROJECT_INDEX.md` 內的「Agent Handoff Kit template version」資料列會更新為目前版本;其他由使用者填寫的資料列會保留。
|
|
10
10
|
|
|
11
11
|
## 建議下一步
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
執行 `doctor` 檢查項目健康即可。
|
package/docs/whatsnew/v0.3.4.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# v0.3.4
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 本版新加了甚麼
|
|
4
4
|
|
|
5
5
|
本版修補升級後版本敘事不一致的問題。既有專案執行 `upgrade` 後,`dev/PROJECT_INDEX.md` 內的「Agent Handoff Kit template version」資料列會在合併完成後再更新為目前 CLI 版本,避免先更新、後又被舊合併結果覆蓋。
|
|
6
6
|
|
|
7
7
|
升級工具也會辨認「只有版本資料列過期」的情況。即使沒有新增檔案、沒有合併檔案、沒有衝突,只要這一列仍是舊版本,就不會誤報「已經是最新版本,沒有檔案需要建立或合併」。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 對你已有檔案的影響
|
|
10
10
|
|
|
11
11
|
本版只會更新 `dev/PROJECT_INDEX.md` 的 template version metadata。這一列屬工具維護的模板資料,不是你填寫的項目內容。你在 External Sources、Fact Base、Workspace Identity 等表格中填過的內容仍會保留。
|
|
12
12
|
|
package/package.json
CHANGED
package/packs/writing.md
CHANGED
|
@@ -16,12 +16,14 @@ Use for drafting, editing, style, structure, publication copy, documentation pro
|
|
|
16
16
|
3. Keep terminology consistent with project docs.
|
|
17
17
|
4. Mark uncertain claims instead of inventing support.
|
|
18
18
|
5. Do not bury durable requirements only in prose; use project index, spec, runbook, or handoff when needed.
|
|
19
|
+
6. For public Traditional Chinese docs or HTML aimed at non-technical readers, use steady written Chinese. Keep English only for commands, paths, URLs, file names, product names, and unavoidable tool names. Avoid mixed half-English fragments, internal governance codes, and developer-only wording in reader-facing prose.
|
|
19
20
|
|
|
20
21
|
## Checks
|
|
21
22
|
|
|
22
23
|
- Verify requested format, language, and tone.
|
|
23
24
|
- Check links, commands, names, and version-sensitive claims when relevant.
|
|
24
25
|
- Check `dev/DOC_SYNC_REGISTRY.md` if public docs or user-facing instructions changed.
|
|
26
|
+
- For public Chinese docs, read the final text as a new user journey: the next action should be clear without technical background.
|
|
25
27
|
|
|
26
28
|
## Closeout
|
|
27
29
|
|
|
@@ -62,7 +62,7 @@ For high-risk work, pause after PLAN. High-risk means destructive operations, am
|
|
|
62
62
|
`agent-handoff-kit upgrade` is considered complete only when all of the following hold. The CLI enforces this contract; do not declare upgrade success without it.
|
|
63
63
|
|
|
64
64
|
1. `AGENTS.md` health state is `clean`: exactly one `# Agent Handoff Kit Core Runtime` heading, exactly one paired managed-core marker block, and no unmarked stale core ranges. Sandwich states (managed marker plus an unmarked stale core) are not clean; the installer must replace the stale ranges, not skip.
|
|
65
|
-
2. The CLI runs `doctor` automatically against the upgraded root after writes complete. `doctor` must report `status: passed` across required files, anchors, schema checks, and
|
|
65
|
+
2. The CLI runs `doctor` automatically against the upgraded root after writes complete. `doctor` must report `status: passed` across required files, anchors, schema checks, handoff lifecycle checks, and credential separation checks. A `START_NEXT_SESSION_PROMPT.txt` convenience-copy warning does not block upgrade health; that file is regenerated at full closeout.
|
|
66
66
|
3. The migration report records every action taken, with backup paths for merged files.
|
|
67
67
|
|
|
68
68
|
If any check fails, the upgrade did not finish; resolve the failure (or hand the failure output to the user) before reporting completion. This contract is the single source of truth for upgrade success; downstream QA scripts and release-grade QA derive their assertions from it.
|
|
@@ -92,7 +92,7 @@ At full closeout:
|
|
|
92
92
|
7. Run the handoff sufficiency check: the next AI should be able to continue from `AGENTS.md`, `dev/SESSION_HANDOFF.md`, `dev/PROJECT_INDEX.md`, and needed rule packs without searching old log history.
|
|
93
93
|
8. If either check fails, fix `dev/SESSION_HANDOFF.md` first; do not push current-state responsibility into `dev/SESSION_LOG.md`.
|
|
94
94
|
9. Show a short closeout card, then provide a copy-paste-ready next-session opening message inside a fenced `text` code block, so the user can clearly copy and paste it into the next session.
|
|
95
|
-
10. Regenerate `START_NEXT_SESSION_PROMPT.txt` from the fenced opening message in `dev/SESSION_HANDOFF.md`. `dev/SESSION_HANDOFF.md` is authoritative; `START_NEXT_SESSION_PROMPT.txt` is only a convenience copy for the user to paste at the next startup.
|
|
95
|
+
10. Regenerate `START_NEXT_SESSION_PROMPT.txt` from the fenced opening message in `dev/SESSION_HANDOFF.md`. `dev/SESSION_HANDOFF.md` is authoritative; `START_NEXT_SESSION_PROMPT.txt` is only a convenience copy for the user to paste at the next startup. During an active session, do not regenerate it just to silence `doctor`; normal `doctor` may warn about drift, but closeout must make the copy match before handoff is declared ready.
|
|
96
96
|
11. Advance the SESSION_LOG N-rule (R-010 SESSION_LOG handoff-role discipline). After prepending the new closeout entry, count `## YYYY-MM-DD` H2 entries in `dev/SESSION_LOG.md`. Any entry now at position N ≥ 11 (oldest end) must be moved into `dev/SESSION_LOG_archive/archive_<batch>_<low_date>_to_<high_date>.md` with raw content preserved. Maintain `dev/SESSION_LOG_archive/INDEX.md` (master index of all archive batches; create on first archive). Entries at N=4–10 whose core facts are already absorbed into HANDOFF / PROJECT_INDEX / requirements / decision records collapse to a short-index line using structural anchors, not line numbers. Entries with unique narrative not yet absorbed must first be ported into the relevant durable source, then collapsed. This is mandatory; do not skip. Handoff capability rests on `dev/SESSION_HANDOFF.md`; `dev/SESSION_LOG.md` is trace-back / audit trail and does not carry handoff responsibility.
|
|
97
97
|
|
|
98
98
|
12. Maintain `dev/PROJECT_DECISIONS.md` per R-028 project narrative discipline. Each closeout must run the following checks with equal mechanical rigor as the SESSION_LOG N-rule (step 11):
|
|
@@ -123,7 +123,7 @@ Record this at closeout so the next AI can detect wrong-root or workspace drift.
|
|
|
123
123
|
| UI behavior | TBD | build + visual/manual check |
|
|
124
124
|
| Data model | TBD | migration/checks |
|
|
125
125
|
| Governance behavior | `AGENTS.md`, `dev/*` | doc sync registry |
|
|
126
|
-
| Closeout/startup contract | `AGENTS.md`, `START_NEXT_SESSION_PROMPT.txt`, `dev/SESSION_HANDOFF.md`, `dev/SESSION_LOG.md`, `dev/PROJECT_INDEX.md` | opening message present + prompt convenience copy
|
|
126
|
+
| Closeout/startup contract | `AGENTS.md`, `START_NEXT_SESSION_PROMPT.txt`, `dev/SESSION_HANDOFF.md`, `dev/SESSION_LOG.md`, `dev/PROJECT_INDEX.md` | opening message present + workspace identity current + prompt convenience copy regenerated from handoff at closeout |
|
|
127
127
|
|
|
128
128
|
## External Services
|
|
129
129
|
|