@adamchanadam/agent-handoff-kit 0.3.40 → 0.3.42

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.
@@ -0,0 +1,74 @@
1
+ // Single source of truth for the historical files Agent Handoff Kit installs
2
+ // and upgrades. Fresh-only files are declared separately so their new path
3
+ // cannot silently become legacy ownership or upgrade evidence.
4
+
5
+ export const INSTALLED_FILE_CONTRACT_SCHEMA = 1;
6
+
7
+ export const installedFileContracts = Object.freeze([
8
+ contract("runtime-core/AGENTS.core.md", "AGENTS.md", "managed-core"),
9
+ contract("runtime-core/CLAUDE.md", "CLAUDE.md", "strict-bridge"),
10
+ contract("runtime-core/GEMINI.md", "GEMINI.md", "strict-bridge"),
11
+ contract("runtime-core/START_NEXT_SESSION_PROMPT.txt", "START_NEXT_SESSION_PROMPT.txt", "generated-state"),
12
+ contract("runtime-core/SESSION_HANDOFF.md", "dev/SESSION_HANDOFF.md", "stateful-handoff"),
13
+ contract("runtime-core/SESSION_LOG.md", "dev/SESSION_LOG.md", "stateful-log"),
14
+ contract("runtime-core/PROJECT_INDEX.md", "dev/PROJECT_INDEX.md", "stateful-index"),
15
+ contract("runtime-core/DOC_SYNC_REGISTRY.md", "dev/DOC_SYNC_REGISTRY.md", "stateful-registry"),
16
+ contract("runtime-core/RULE_PACKS.md", "dev/RULE_PACKS.md", "marked-routing-table"),
17
+ contract("runtime-core/PROJECT_DECISIONS.md", "dev/PROJECT_DECISIONS.md", "stateful-decisions"),
18
+ contract("packs/safety.md", "dev/rules/safety.md", "rule-pack"),
19
+ contract("packs/coding.md", "dev/rules/coding.md", "rule-pack"),
20
+ contract("packs/writing.md", "dev/rules/writing.md", "rule-pack"),
21
+ contract("packs/research.md", "dev/rules/research.md", "rule-pack"),
22
+ contract("packs/agent-governance.md", "dev/rules/agent-governance.md", "rule-pack"),
23
+ contract("packs/release.md", "dev/rules/release.md", "rule-pack"),
24
+ contract("packs/knowledge.md", "dev/rules/knowledge.md", "rule-pack"),
25
+ contract("packs/communication.md", "dev/rules/communication.md", "rule-pack"),
26
+ contract("packs/closeout.md", "dev/rules/closeout.md", "rule-pack"),
27
+ contract("packs/onboarding.md", "dev/rules/onboarding.md", "rule-pack"),
28
+ contract("packs/integrations.md", "dev/rules/integrations.md", "rule-pack")
29
+ ]);
30
+
31
+ export const installedMappings = Object.freeze(
32
+ installedFileContracts.map(({ sourceRel, targetRel }) => Object.freeze([sourceRel, targetRel]))
33
+ );
34
+
35
+ // The router is installed on fresh roots, but is not evidence that an arbitrary
36
+ // legacy or mixed file is Kit-managed. Its upgrade treatment lives in a
37
+ // separate, state-bound transition contract below rather than the historical
38
+ // file catalog.
39
+ export const freshInstallFileContracts = Object.freeze([
40
+ ...installedFileContracts,
41
+ contract("runtime-core/USER_RULES.md", "dev/USER_RULES.md", "fresh-user-router")
42
+ ]);
43
+
44
+ export const freshInstallMappings = Object.freeze(
45
+ freshInstallFileContracts.map(({ sourceRel, targetRel }) => Object.freeze([sourceRel, targetRel]))
46
+ );
47
+
48
+ // R-034: formal user-rule state is part of an upgrade only when the existing
49
+ // AGENTS.md entry and router form one verifiable formal state. This separate
50
+ // contract deliberately does not reclassify a path, title, or directory as
51
+ // historical Kit ownership.
52
+ export const upgradeStateFileContracts = Object.freeze([
53
+ contract("runtime-core/USER_RULES.md", "dev/USER_RULES.md", "accepted-user-rules-router")
54
+ ]);
55
+
56
+ export const upgradeStateMappings = Object.freeze(
57
+ upgradeStateFileContracts.map(({ sourceRel, targetRel }) => Object.freeze([sourceRel, targetRel]))
58
+ );
59
+
60
+ export const upgradeStateTargets = Object.freeze(
61
+ upgradeStateFileContracts.map(({ targetRel }) => targetRel)
62
+ );
63
+
64
+ export const requiredInstalledTargets = Object.freeze(
65
+ installedFileContracts.map(({ targetRel }) => targetRel)
66
+ );
67
+
68
+ export function installedFileContract(targetRel) {
69
+ return installedFileContracts.find((item) => item.targetRel === targetRel) ?? null;
70
+ }
71
+
72
+ function contract(sourceRel, targetRel, strategy) {
73
+ return Object.freeze({ sourceRel, targetRel, strategy });
74
+ }