instar 1.2.26 → 1.2.27
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/dist/core/OrgIntentDriftAnalyzer.d.ts +87 -0
- package/dist/core/OrgIntentDriftAnalyzer.d.ts.map +1 -0
- package/dist/core/OrgIntentDriftAnalyzer.js +191 -0
- package/dist/core/OrgIntentDriftAnalyzer.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +30 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +49 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +61 -61
- package/src/scaffold/templates/jobs/instar/org-intent-drift-audit.md +34 -0
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.2.26.md +35 -28
- package/upgrades/1.2.27.md +40 -0
- package/upgrades/side-effects/org-intent-drift-detection.md +101 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrgIntentDriftAnalyzer — Phase 4 of the ORG-INTENT runtime project.
|
|
3
|
+
*
|
|
4
|
+
* Samples recent Coherence Gate review history and emits a drift digest:
|
|
5
|
+
* which reviewer dimensions are flagging most, whether the trend is rising
|
|
6
|
+
* or falling between the two halves of the lookback window, which ORG-INTENT
|
|
7
|
+
* constraints are most frequently being approached, and a single overall
|
|
8
|
+
* trend label.
|
|
9
|
+
*
|
|
10
|
+
* SIGNAL only — never blocks anything. The Coherence Gate from Phase 1
|
|
11
|
+
* remains the authority for any actual message-review decision. This module
|
|
12
|
+
* exists to surface accumulated patterns that no single review verdict
|
|
13
|
+
* could catch on its own — the Klarna failure mode early-warning surface.
|
|
14
|
+
*
|
|
15
|
+
* Deterministic pure logic. No LLM call. Given the same input it always
|
|
16
|
+
* produces the same output.
|
|
17
|
+
*/
|
|
18
|
+
import type { ParsedOrgIntent } from './OrgIntentManager.js';
|
|
19
|
+
/**
|
|
20
|
+
* Minimal shape of a review history entry the analyzer needs. Subset of
|
|
21
|
+
* CoherenceGate's AuditLogEntry — keeps the analyzer decoupled from the
|
|
22
|
+
* gate's internal types so it can be reused for offline analysis.
|
|
23
|
+
*/
|
|
24
|
+
export interface DriftReviewEntry {
|
|
25
|
+
/** ISO-8601 timestamp string. */
|
|
26
|
+
timestamp: string;
|
|
27
|
+
/** Outcome verdict — e.g. 'pass', 'block', 'hold', 'pass-warn'. */
|
|
28
|
+
verdict: string;
|
|
29
|
+
/** Per-reviewer violations from this entry. */
|
|
30
|
+
violations: Array<{
|
|
31
|
+
reviewer: string;
|
|
32
|
+
severity: 'block' | 'warn';
|
|
33
|
+
issue: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
export interface DriftAnalysisInput {
|
|
37
|
+
/** Review history entries (already filtered to the analysis window by caller). */
|
|
38
|
+
entries: DriftReviewEntry[];
|
|
39
|
+
/** Parsed ORG-INTENT.md, or null if absent. */
|
|
40
|
+
orgIntent: ParsedOrgIntent | null;
|
|
41
|
+
/** Lookback window in days, used for output framing only. */
|
|
42
|
+
lookbackDays?: number;
|
|
43
|
+
/** Sensitivity controls. */
|
|
44
|
+
thresholds?: {
|
|
45
|
+
/** Block-rate threshold (fraction) for 'concerning' verdict. Default 0.15. */
|
|
46
|
+
concerningBlockRate?: number;
|
|
47
|
+
/** Block-rate threshold (fraction) for 'rising' verdict. Default 0.05. */
|
|
48
|
+
risingBlockRate?: number;
|
|
49
|
+
/** Minimum entries before reporting a trend. Below this, returns 'insufficient-data'. */
|
|
50
|
+
minEntries?: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export interface ReviewerStats {
|
|
54
|
+
reviewer: string;
|
|
55
|
+
total: number;
|
|
56
|
+
blocks: number;
|
|
57
|
+
warns: number;
|
|
58
|
+
blockRate: number;
|
|
59
|
+
}
|
|
60
|
+
export interface DriftAnalysis {
|
|
61
|
+
/** Overall trend label. */
|
|
62
|
+
trend: 'stable' | 'rising' | 'concerning' | 'insufficient-data' | 'no-org-intent';
|
|
63
|
+
/** Window stats. */
|
|
64
|
+
windowDays: number;
|
|
65
|
+
totalEntries: number;
|
|
66
|
+
blockedEntries: number;
|
|
67
|
+
overallBlockRate: number;
|
|
68
|
+
/** Half-window comparison: first half vs second half block rates. */
|
|
69
|
+
firstHalfBlockRate: number;
|
|
70
|
+
secondHalfBlockRate: number;
|
|
71
|
+
/** Per-reviewer breakdown. */
|
|
72
|
+
perReviewer: ReviewerStats[];
|
|
73
|
+
/** Reviewer dimensions flagged as drifting (top N by block count). */
|
|
74
|
+
flaggedDimensions: string[];
|
|
75
|
+
/** Mapped to ORG-INTENT bucket counts. */
|
|
76
|
+
constraintMatches: number;
|
|
77
|
+
goalMatches: number;
|
|
78
|
+
valueMatches: number;
|
|
79
|
+
/** Human-readable summary suitable for a Telegram digest. */
|
|
80
|
+
summary: string;
|
|
81
|
+
/** Suggested next actions for the user / agent. */
|
|
82
|
+
suggestions: string[];
|
|
83
|
+
/** True when caller should surface this digest (trend != 'stable' && != 'insufficient-data' && != 'no-org-intent'). */
|
|
84
|
+
shouldSurface: boolean;
|
|
85
|
+
}
|
|
86
|
+
export declare function analyzeOrgIntentDrift(input: DriftAnalysisInput): DriftAnalysis;
|
|
87
|
+
//# sourceMappingURL=OrgIntentDriftAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrgIntentDriftAnalyzer.d.ts","sourceRoot":"","sources":["../../src/core/OrgIntentDriftAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI7D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B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IAC7B,sEAAsE;IACtE,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,0CAA0C;IAC1C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,uHAAuH;IACvH,aAAa,EAAE,OAAO,CAAC;CACxB;AAYD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAgL9E"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrgIntentDriftAnalyzer — Phase 4 of the ORG-INTENT runtime project.
|
|
3
|
+
*
|
|
4
|
+
* Samples recent Coherence Gate review history and emits a drift digest:
|
|
5
|
+
* which reviewer dimensions are flagging most, whether the trend is rising
|
|
6
|
+
* or falling between the two halves of the lookback window, which ORG-INTENT
|
|
7
|
+
* constraints are most frequently being approached, and a single overall
|
|
8
|
+
* trend label.
|
|
9
|
+
*
|
|
10
|
+
* SIGNAL only — never blocks anything. The Coherence Gate from Phase 1
|
|
11
|
+
* remains the authority for any actual message-review decision. This module
|
|
12
|
+
* exists to surface accumulated patterns that no single review verdict
|
|
13
|
+
* could catch on its own — the Klarna failure mode early-warning surface.
|
|
14
|
+
*
|
|
15
|
+
* Deterministic pure logic. No LLM call. Given the same input it always
|
|
16
|
+
* produces the same output.
|
|
17
|
+
*/
|
|
18
|
+
// ── Defaults ─────────────────────────────────────────────────────────
|
|
19
|
+
const DEFAULT_THRESHOLDS = {
|
|
20
|
+
concerningBlockRate: 0.15,
|
|
21
|
+
risingBlockRate: 0.05,
|
|
22
|
+
minEntries: 5,
|
|
23
|
+
};
|
|
24
|
+
// ── Main analyzer ────────────────────────────────────────────────────
|
|
25
|
+
export function analyzeOrgIntentDrift(input) {
|
|
26
|
+
const { entries, orgIntent, lookbackDays = 7 } = input;
|
|
27
|
+
const t = { ...DEFAULT_THRESHOLDS, ...(input.thresholds ?? {}) };
|
|
28
|
+
// No ORG-INTENT.md → analyzer has nothing to compare against.
|
|
29
|
+
if (!orgIntent) {
|
|
30
|
+
return {
|
|
31
|
+
trend: 'no-org-intent',
|
|
32
|
+
windowDays: lookbackDays,
|
|
33
|
+
totalEntries: entries.length,
|
|
34
|
+
blockedEntries: 0,
|
|
35
|
+
overallBlockRate: 0,
|
|
36
|
+
firstHalfBlockRate: 0,
|
|
37
|
+
secondHalfBlockRate: 0,
|
|
38
|
+
perReviewer: [],
|
|
39
|
+
flaggedDimensions: [],
|
|
40
|
+
constraintMatches: 0,
|
|
41
|
+
goalMatches: 0,
|
|
42
|
+
valueMatches: 0,
|
|
43
|
+
summary: 'No ORG-INTENT.md found. Drift analysis requires an organizational intent file to compare behavior against.',
|
|
44
|
+
suggestions: [
|
|
45
|
+
'Scaffold a starter with: instar intent org-init "Your Org Name"',
|
|
46
|
+
'Then re-run this audit to surface accumulated drift.',
|
|
47
|
+
],
|
|
48
|
+
shouldSurface: false,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Insufficient data → can't reliably detect trends with too few samples.
|
|
52
|
+
if (entries.length < t.minEntries) {
|
|
53
|
+
return {
|
|
54
|
+
trend: 'insufficient-data',
|
|
55
|
+
windowDays: lookbackDays,
|
|
56
|
+
totalEntries: entries.length,
|
|
57
|
+
blockedEntries: 0,
|
|
58
|
+
overallBlockRate: 0,
|
|
59
|
+
firstHalfBlockRate: 0,
|
|
60
|
+
secondHalfBlockRate: 0,
|
|
61
|
+
perReviewer: [],
|
|
62
|
+
flaggedDimensions: [],
|
|
63
|
+
constraintMatches: 0,
|
|
64
|
+
goalMatches: 0,
|
|
65
|
+
valueMatches: 0,
|
|
66
|
+
summary: `Only ${entries.length} review entries in the last ${lookbackDays} days — not enough data to surface a drift trend (need ≥${t.minEntries}).`,
|
|
67
|
+
suggestions: [],
|
|
68
|
+
shouldSurface: false,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
// Sort by timestamp ascending so first-half / second-half halves are chronological.
|
|
72
|
+
const sorted = [...entries].sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
73
|
+
const mid = Math.floor(sorted.length / 2);
|
|
74
|
+
const firstHalf = sorted.slice(0, mid);
|
|
75
|
+
const secondHalf = sorted.slice(mid);
|
|
76
|
+
// Compute overall block rate
|
|
77
|
+
const isBlock = (e) => e.verdict.includes('block') || e.verdict.includes('hold');
|
|
78
|
+
const blockedEntries = sorted.filter(isBlock).length;
|
|
79
|
+
const overallBlockRate = sorted.length > 0 ? blockedEntries / sorted.length : 0;
|
|
80
|
+
const firstHalfBlocked = firstHalf.filter(isBlock).length;
|
|
81
|
+
const secondHalfBlocked = secondHalf.filter(isBlock).length;
|
|
82
|
+
const firstHalfBlockRate = firstHalf.length > 0 ? firstHalfBlocked / firstHalf.length : 0;
|
|
83
|
+
const secondHalfBlockRate = secondHalf.length > 0 ? secondHalfBlocked / secondHalf.length : 0;
|
|
84
|
+
// Per-reviewer stats
|
|
85
|
+
const reviewerMap = new Map();
|
|
86
|
+
for (const e of sorted) {
|
|
87
|
+
for (const v of e.violations) {
|
|
88
|
+
const cur = reviewerMap.get(v.reviewer) ?? { total: 0, blocks: 0, warns: 0 };
|
|
89
|
+
cur.total++;
|
|
90
|
+
if (v.severity === 'block')
|
|
91
|
+
cur.blocks++;
|
|
92
|
+
else
|
|
93
|
+
cur.warns++;
|
|
94
|
+
reviewerMap.set(v.reviewer, cur);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const perReviewer = [...reviewerMap.entries()]
|
|
98
|
+
.map(([reviewer, c]) => ({
|
|
99
|
+
reviewer,
|
|
100
|
+
total: c.total,
|
|
101
|
+
blocks: c.blocks,
|
|
102
|
+
warns: c.warns,
|
|
103
|
+
blockRate: c.total > 0 ? c.blocks / c.total : 0,
|
|
104
|
+
}))
|
|
105
|
+
.sort((a, b) => b.blocks - a.blocks);
|
|
106
|
+
// Flag dimensions with notable block counts (top 3 by blocks, blocks > 0)
|
|
107
|
+
const flaggedDimensions = perReviewer
|
|
108
|
+
.filter(r => r.blocks > 0)
|
|
109
|
+
.slice(0, 3)
|
|
110
|
+
.map(r => r.reviewer);
|
|
111
|
+
// Cross-reference with ORG-INTENT buckets — count how many violations mention
|
|
112
|
+
// a constraint / goal / value substring. Heuristic but useful for narrative.
|
|
113
|
+
let constraintMatches = 0;
|
|
114
|
+
let goalMatches = 0;
|
|
115
|
+
let valueMatches = 0;
|
|
116
|
+
for (const e of sorted) {
|
|
117
|
+
for (const v of e.violations) {
|
|
118
|
+
const issueLower = (v.issue || '').toLowerCase();
|
|
119
|
+
for (const c of orgIntent.constraints) {
|
|
120
|
+
if (issueLower.includes(c.text.toLowerCase().slice(0, 20))) {
|
|
121
|
+
constraintMatches++;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
for (const g of orgIntent.goals) {
|
|
126
|
+
if (issueLower.includes(g.text.toLowerCase().slice(0, 20))) {
|
|
127
|
+
goalMatches++;
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
for (const val of orgIntent.values) {
|
|
132
|
+
if (issueLower.includes(val.toLowerCase().slice(0, 20))) {
|
|
133
|
+
valueMatches++;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Determine overall trend.
|
|
140
|
+
let trend = 'stable';
|
|
141
|
+
if (overallBlockRate >= t.concerningBlockRate) {
|
|
142
|
+
trend = 'concerning';
|
|
143
|
+
}
|
|
144
|
+
else if (secondHalfBlockRate > firstHalfBlockRate + t.risingBlockRate
|
|
145
|
+
&& secondHalfBlockRate >= t.risingBlockRate) {
|
|
146
|
+
trend = 'rising';
|
|
147
|
+
}
|
|
148
|
+
// Compose summary + suggestions
|
|
149
|
+
const summaryLines = [];
|
|
150
|
+
if (trend === 'concerning') {
|
|
151
|
+
summaryLines.push(`Block rate of ${(overallBlockRate * 100).toFixed(1)}% across ${sorted.length} reviews in the last ${lookbackDays} days is above the concerning threshold (${(t.concerningBlockRate * 100).toFixed(0)}%).`);
|
|
152
|
+
summaryLines.push(`Most-flagged reviewers: ${flaggedDimensions.join(', ') || '(none)'}.`);
|
|
153
|
+
if (constraintMatches > 0) {
|
|
154
|
+
summaryLines.push(`${constraintMatches} flagged review(s) mentioned an ORG-INTENT constraint by name.`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else if (trend === 'rising') {
|
|
158
|
+
summaryLines.push(`Block rate trending up: first half ${(firstHalfBlockRate * 100).toFixed(1)}% → second half ${(secondHalfBlockRate * 100).toFixed(1)}% over ${sorted.length} reviews in the last ${lookbackDays} days.`);
|
|
159
|
+
summaryLines.push(`Most-flagged reviewers: ${flaggedDimensions.join(', ') || '(none)'}.`);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
summaryLines.push(`Block rate stable at ${(overallBlockRate * 100).toFixed(1)}% across ${sorted.length} reviews in the last ${lookbackDays} days. No drift surfaced.`);
|
|
163
|
+
}
|
|
164
|
+
const summary = summaryLines.join(' ');
|
|
165
|
+
const suggestions = [];
|
|
166
|
+
if (trend === 'concerning' || trend === 'rising') {
|
|
167
|
+
suggestions.push(`Review the most-flagged reviewer dimension (${flaggedDimensions[0] ?? 'value-alignment'}) for recent issues — recent blocks tend to cluster by category.`);
|
|
168
|
+
if (orgIntent.constraints.length > 0) {
|
|
169
|
+
suggestions.push('Re-read .instar/ORG-INTENT.md constraints; consider whether any need to be tightened, loosened, or scoped to specific channels.');
|
|
170
|
+
}
|
|
171
|
+
suggestions.push('Check the canonical state for any recent context changes that might explain a sudden drift (deployments, user-facing changes, autonomy profile shifts).');
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
trend,
|
|
175
|
+
windowDays: lookbackDays,
|
|
176
|
+
totalEntries: sorted.length,
|
|
177
|
+
blockedEntries,
|
|
178
|
+
overallBlockRate,
|
|
179
|
+
firstHalfBlockRate,
|
|
180
|
+
secondHalfBlockRate,
|
|
181
|
+
perReviewer,
|
|
182
|
+
flaggedDimensions,
|
|
183
|
+
constraintMatches,
|
|
184
|
+
goalMatches,
|
|
185
|
+
valueMatches,
|
|
186
|
+
summary,
|
|
187
|
+
suggestions,
|
|
188
|
+
shouldSurface: trend === 'concerning' || trend === 'rising',
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=OrgIntentDriftAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrgIntentDriftAnalyzer.js","sourceRoot":"","sources":["../../src/core/OrgIntentDriftAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA6EH,wEAAwE;AAExE,MAAM,kBAAkB,GAAG;IACzB,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,CAAC;CACd,CAAC;AAEF,wEAAwE;AAExE,MAAM,UAAU,qBAAqB,CAAC,KAAyB;IAC7D,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IACvD,MAAM,CAAC,GAAG,EAAE,GAAG,kBAAkB,EAAE,GAAG,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE,CAAC;IAEjE,8DAA8D;IAC9D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO;YACL,KAAK,EAAE,eAAe;YACtB,UAAU,EAAE,YAAY;YACxB,YAAY,EAAE,OAAO,CAAC,MAAM;YAC5B,cAAc,EAAE,CAAC;YACjB,gBAAgB,EAAE,CAAC;YACnB,kBAAkB,EAAE,CAAC;YACrB,mBAAmB,EAAE,CAAC;YACtB,WAAW,EAAE,EAAE;YACf,iBAAiB,EAAE,EAAE;YACrB,iBAAiB,EAAE,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H/B,OAAO,CAAC,2BAA2B;IA8GnC,OAAO,CAAC,iCAAiC;IA6DzC,OAAO,CAAC,4BAA4B;IA4LpC;;;;;;;;;;OAUG;IACH;;;;;;;;;;;OAWG;IAEH,gBAAuB,iCAAiC,EAAE,WAAW,CAAC,MAAM,CAAC,CA4B1E;IAEH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,8BAA8B;IAiHtC,OAAO,CAAC,uBAAuB;IA4B/B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,sBAAsB;IAwC9B,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,8BAA8B;IAoHtC,OAAO,CAAC,+BAA+B;IAmJvC,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,qBAAqB;IA4N7B,OAAO,CAAC,qBAAqB;IA4H7B,OAAO,CAAC,6BAA6B;IAyKrC,OAAO,CAAC,0BAA0B;IAgClC,OAAO,CAAC,gBAAgB;IAqFxB,OAAO,CAAC,6BAA6B;CAoCtC"}
|
|
@@ -2037,6 +2037,7 @@ Manage it:
|
|
|
2037
2037
|
- Inspect parsed structure: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org\`
|
|
2038
2038
|
- Preview the session-start block: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org/session-context\`
|
|
2039
2039
|
- Resolve a tradeoff via the org hierarchy (Phase 3): \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"valueA":"speed","valueB":"customer trust"}' http://localhost:${port}/intent/tradeoff-resolve\` — returns the winning value with explanation per the org's tradeoff hierarchy.
|
|
2040
|
+
- Surface accumulated drift (Phase 4): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/intent/org/drift?lookbackDays=7"\` — drift digest from recent Coherence Gate review history. A weekly job template (\`.instar/jobs/instar/org-intent-drift-audit.md\`, off by default) wraps this for periodic Telegram heads-ups.
|
|
2040
2041
|
|
|
2041
2042
|
**Topic-Project Bindings**: Each Telegram topic can be bound to a specific project. When switching topics, verify the binding matches your current working directory.
|
|
2042
2043
|
- View bindings: \`GET http://localhost:${port}/topic-bindings\`
|
|
@@ -2074,6 +2075,7 @@ Manage it:
|
|
|
2074
2075
|
- Inspect parsed structure: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org\`
|
|
2075
2076
|
- Preview the session-start block: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org/session-context\`
|
|
2076
2077
|
- Resolve a tradeoff via the org hierarchy (Phase 3): \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"valueA":"speed","valueB":"customer trust"}' http://localhost:${port}/intent/tradeoff-resolve\` — returns the winning value with explanation per the org's tradeoff hierarchy.
|
|
2078
|
+
- Surface accumulated drift (Phase 4): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/intent/org/drift?lookbackDays=7"\` — drift digest from recent Coherence Gate review history. A weekly job template (\`.instar/jobs/instar/org-intent-drift-audit.md\`, off by default) wraps this for periodic Telegram heads-ups.
|
|
2077
2079
|
`;
|
|
2078
2080
|
// Anchor: insert after "Topic-Project Bindings" header so it lands inside
|
|
2079
2081
|
// the Coherence Gate section but before the Project Map subsection.
|
|
@@ -2090,13 +2092,39 @@ Manage it:
|
|
|
2090
2092
|
result.upgraded.push('CLAUDE.md: appended ORG-INTENT.md runtime subsection (anchor missing, fallback insert)');
|
|
2091
2093
|
}
|
|
2092
2094
|
}
|
|
2095
|
+
else if (content.includes('ORG-INTENT.md (Organizational Intent at Runtime)')
|
|
2096
|
+
&& content.includes('/intent/tradeoff-resolve')
|
|
2097
|
+
&& !content.includes('/intent/org/drift')) {
|
|
2098
|
+
// CLAUDE.md has Phase 1+2+3 but is missing Phase 4 (drift detection).
|
|
2099
|
+
// Append the drift curl line to the existing Manage-it bullet list.
|
|
2100
|
+
// Idempotent: substring check above prevents re-insertion.
|
|
2101
|
+
const driftLine = `- Surface accumulated drift (Phase 4): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/intent/org/drift?lookbackDays=7"\` — drift digest from recent Coherence Gate review history. A weekly job template (\`.instar/jobs/instar/org-intent-drift-audit.md\`, off by default) wraps this for periodic Telegram heads-ups.`;
|
|
2102
|
+
// Anchor: insert right after the Phase 3 tradeoff-resolve line.
|
|
2103
|
+
const phase3Marker = '/intent/tradeoff-resolve';
|
|
2104
|
+
const idx = content.indexOf(phase3Marker);
|
|
2105
|
+
if (idx >= 0) {
|
|
2106
|
+
const lineEnd = content.indexOf('\n', idx);
|
|
2107
|
+
if (lineEnd >= 0) {
|
|
2108
|
+
content = content.slice(0, lineEnd + 1) + driftLine + '\n' + content.slice(lineEnd + 1);
|
|
2109
|
+
patched = true;
|
|
2110
|
+
result.upgraded.push('CLAUDE.md: added Phase 4 drift-detection curl line to ORG-INTENT subsection');
|
|
2111
|
+
}
|
|
2112
|
+
else {
|
|
2113
|
+
result.skipped.push('CLAUDE.md: Phase 3 marker present but newline anchor missing (skipping)');
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
else {
|
|
2117
|
+
result.skipped.push('CLAUDE.md: Phase 3 anchor for drift insertion not found (skipping)');
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2093
2120
|
else if (content.includes('ORG-INTENT.md (Organizational Intent at Runtime)')
|
|
2094
2121
|
&& content.includes('/intent/org/session-context')
|
|
2095
2122
|
&& !content.includes('/intent/tradeoff-resolve')) {
|
|
2096
2123
|
// CLAUDE.md has Phase 1+2 but is missing Phase 3 (tradeoff helper).
|
|
2097
2124
|
// Append the tradeoff-resolve curl line to the existing Manage-it
|
|
2098
2125
|
// bullet list. Idempotent: substring check above prevents re-insertion.
|
|
2099
|
-
const tradeoffLine = `- Resolve a tradeoff via the org hierarchy (Phase 3): \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"valueA":"speed","valueB":"customer trust"}' http://localhost:${port}/intent/tradeoff-resolve\` — returns the winning value with explanation per the org's tradeoff hierarchy
|
|
2126
|
+
const tradeoffLine = `- Resolve a tradeoff via the org hierarchy (Phase 3): \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"valueA":"speed","valueB":"customer trust"}' http://localhost:${port}/intent/tradeoff-resolve\` — returns the winning value with explanation per the org's tradeoff hierarchy.
|
|
2127
|
+
- Surface accumulated drift (Phase 4): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/intent/org/drift?lookbackDays=7"\` — drift digest from recent Coherence Gate review history. A weekly job template (\`.instar/jobs/instar/org-intent-drift-audit.md\`, off by default) wraps this for periodic Telegram heads-ups.`;
|
|
2100
2128
|
const anchor = `- Preview the session-start block: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org/session-context\``;
|
|
2101
2129
|
const before = content;
|
|
2102
2130
|
content = content.replace(anchor, `${anchor}\n${tradeoffLine}`);
|
|
@@ -2127,6 +2155,7 @@ Manage it:
|
|
|
2127
2155
|
- Inspect parsed structure: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org\`
|
|
2128
2156
|
- Preview the session-start block: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org/session-context\`
|
|
2129
2157
|
- Resolve a tradeoff via the org hierarchy (Phase 3): \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"valueA":"speed","valueB":"customer trust"}' http://localhost:${port}/intent/tradeoff-resolve\` — returns the winning value with explanation per the org's tradeoff hierarchy.
|
|
2158
|
+
- Surface accumulated drift (Phase 4): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/intent/org/drift?lookbackDays=7"\` — drift digest from recent Coherence Gate review history. A weekly job template (\`.instar/jobs/instar/org-intent-drift-audit.md\`, off by default) wraps this for periodic Telegram heads-ups.
|
|
2130
2159
|
|
|
2131
2160
|
`;
|
|
2132
2161
|
const before = content;
|