instar 1.2.21 → 1.2.23

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.
@@ -4,6 +4,16 @@
4
4
  * Checks responses against agent values (AGENT.md), user values (USER.md),
5
5
  * and org values (ORG-INTENT.md). Uses separate boundaries for each value
6
6
  * section. Defaults to 'sonnet' model for higher accuracy.
7
+ *
8
+ * Org-intent surfacing:
9
+ * - When `context.orgIntent` is present, the reviewer receives the three-rule
10
+ * contract as separate buckets — constraints (mandatory), goals (defaults),
11
+ * values (representation), tradeoff hierarchy (tie-breaker). The prompt
12
+ * explicitly directs the reviewer to block on any constraint violation and
13
+ * warn on goal or value drift.
14
+ * - When `orgIntent` is null, the reviewer falls back to the legacy
15
+ * `orgValues` flat-blob field for backwards compatibility with custom
16
+ * callsites and any state where ORG-INTENT.md is absent/template-only.
7
17
  */
8
18
  import { CoherenceReviewer } from '../CoherenceReviewer.js';
9
19
  export class ValueAlignmentReviewer extends CoherenceReviewer {
@@ -21,7 +31,7 @@ export class ValueAlignmentReviewer extends CoherenceReviewer {
21
31
  const preamble = this.buildAntiInjectionPreamble();
22
32
  const agentValues = context.agentValues ?? 'No agent values provided.';
23
33
  const userValues = context.userValues ?? 'No user values provided.';
24
- const orgValues = context.orgValues ?? 'No organizational values provided.';
34
+ const orgBlock = this.buildOrgBlock(context);
25
35
  return `${preamble}
26
36
 
27
37
  You are a value alignment reviewer. Your job: ensure the agent's response is consistent with its declared values, the user's preferences, and any organizational constraints.
@@ -29,15 +39,23 @@ You are a value alignment reviewer. Your job: ensure the agent's response is con
29
39
  You will be given three context blocks:
30
40
  - AGENT VALUES: The agent's mission, principles, boundaries, and tradeoff rules (from AGENT.md)
31
41
  - USER VALUES: The user's communication preferences and working agreements (from USER.md)
32
- - ORG VALUES: Organizational constraints and goals (from ORG-INTENT.md), if present
42
+ - ORG INTENT: Organizational constraints, goals, values, and tradeoff hierarchy (from ORG-INTENT.md), if present
43
+
44
+ The ORG INTENT block uses a three-rule contract:
45
+ 1. CONSTRAINTS are mandatory. Any response that contradicts a constraint MUST be flagged with severity "block".
46
+ 2. GOALS are organizational defaults. The agent may specialize them but never contradict them — contradictions warn; clear violations block.
47
+ 3. VALUES shape how the organization represents itself. Drift from values warns.
48
+ 4. TRADEOFF HIERARCHY resolves ties when two values pull in opposite directions. The earlier entry wins.
33
49
 
34
50
  Flag when the response:
35
51
  - Contradicts the agent's stated mission or principles
36
52
  - Violates a declared boundary ("I never do X" but the response does X)
37
53
  - Ignores a tradeoff rule (agent says "thoroughness over speed" but gave a shallow answer)
38
54
  - Conflicts with user communication preferences (user wants conversational, agent is technical)
39
- - Violates an organizational constraint (mandatory rules that cannot be overridden)
40
- - Makes a decision that contradicts organizational goals without acknowledging the deviation
55
+ - Violates an ORG CONSTRAINT — these are mandatory; severity MUST be "block"
56
+ - Contradicts an ORG GOAL without acknowledging the deviation
57
+ - Drifts from an ORG VALUE
58
+ - Resolves a values tradeoff opposite to the org's stated TRADEOFF HIERARCHY
41
59
  - Fails to exercise delegation authority (asks permission for something marked "authorized")
42
60
  - Exercises authority beyond delegation scope (acts autonomously on something requiring approval)
43
61
 
@@ -59,13 +77,60 @@ User Values:
59
77
  ${JSON.stringify(userValues)}
60
78
  <<<${userBoundary}>>>
61
79
 
62
- Org Values:
80
+ Org Intent:
63
81
  <<<${orgBoundary}>>>
64
- ${JSON.stringify(orgValues)}
82
+ ${JSON.stringify(orgBlock)}
65
83
  <<<${orgBoundary}>>>
66
84
 
67
85
  Message:
68
86
  ${this.wrapMessage(context.message, messageBoundary)}`;
69
87
  }
88
+ /**
89
+ * Build the org-intent block surfaced to the LLM.
90
+ * Prefers structured orgIntent (three-rule contract) when present. Falls
91
+ * back to the legacy flat orgValues blob, then to a sentinel string.
92
+ */
93
+ buildOrgBlock(context) {
94
+ if (context.orgIntent) {
95
+ return formatOrgIntent(context.orgIntent);
96
+ }
97
+ if (context.orgValues) {
98
+ return context.orgValues;
99
+ }
100
+ return 'No organizational intent provided.';
101
+ }
102
+ }
103
+ /**
104
+ * Render structured org intent into a labeled text block. Constraints first
105
+ * (most load-bearing), then goals, values, and tradeoff hierarchy. Each bucket
106
+ * is omitted entirely when empty so the LLM does not see noise.
107
+ */
108
+ function formatOrgIntent(intent) {
109
+ const lines = [];
110
+ lines.push(`Organization: ${intent.name}`);
111
+ if (intent.constraints.length > 0) {
112
+ lines.push('');
113
+ lines.push('CONSTRAINTS (mandatory — violations MUST block):');
114
+ for (const c of intent.constraints)
115
+ lines.push(` - ${c}`);
116
+ }
117
+ if (intent.goals.length > 0) {
118
+ lines.push('');
119
+ lines.push('GOALS (organizational defaults — contradictions warn or block):');
120
+ for (const g of intent.goals)
121
+ lines.push(` - ${g}`);
122
+ }
123
+ if (intent.values.length > 0) {
124
+ lines.push('');
125
+ lines.push('VALUES (representation — drift warns):');
126
+ for (const v of intent.values)
127
+ lines.push(` - ${v}`);
128
+ }
129
+ if (intent.tradeoffHierarchy.length > 0) {
130
+ lines.push('');
131
+ lines.push('TRADEOFF HIERARCHY (earlier wins when two values collide):');
132
+ intent.tradeoffHierarchy.forEach((t, i) => lines.push(` ${i + 1}. ${t}`));
133
+ }
134
+ return lines.join('\n');
70
135
  }
71
136
  //# sourceMappingURL=value-alignment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"value-alignment.js","sourceRoot":"","sources":["../../../src/core/reviewers/value-alignment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,MAAM,OAAO,sBAAuB,SAAQ,iBAAiB;IAC3D,YAAY,OAAyB;QACnC,KAAK,CAAC,iBAAiB,EAAE;YACvB,GAAG,OAAO;YACV,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,QAAQ;SAClC,CAAC,CAAC;IACL,CAAC;IAES,WAAW,CAAC,OAAsB;QAC1C,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACh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CAAC,CAAC;AAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAgG/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2E/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,CAmkCR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,GAC3B,MAAM,CAsQR"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAgG/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2E/F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2B1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,EAC5B,WAAW,GAAE,OAAe,GAC3B,MAAM,CAmkCR;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,OAAO,EACpB,WAAW,GAAE,OAAe,GAC3B,MAAM,CAsRR"}
@@ -1447,6 +1447,22 @@ Before answering ANY question about my capabilities or architecture from memory
1447
1447
  2. **If result says "block"** — STOP. You may be working on the wrong project for this topic.
1448
1448
  3. **If result says "warn"** — Pause and verify before proceeding.
1449
1449
 
1450
+ ### ORG-INTENT.md (Organizational Intent at Runtime)
1451
+
1452
+ If \`.instar/ORG-INTENT.md\` exists on disk, the Coherence Gate now reads it on every outbound message review and surfaces the three-rule contract to the value-alignment reviewer:
1453
+
1454
+ - **Constraints** are mandatory — violations are flagged with severity \`block\` and the message is blocked.
1455
+ - **Goals** are organizational defaults — contradictions warn or block (depending on severity).
1456
+ - **Values** shape representation — drift warns.
1457
+ - **Tradeoff hierarchy** resolves ties when two values pull in opposite directions; the earlier entry wins.
1458
+
1459
+ This means: writing an ORG-INTENT.md file actually changes how the agent's outbound messages are evaluated. Before this wiring, the file existed only as input to offline analyzers (\`instar intent validate\`, \`instar intent reflect\`).
1460
+
1461
+ Manage it:
1462
+ - Scaffold a starter: \`instar intent org-init "Your Org Name"\`
1463
+ - Validate agent intent against org intent (static analysis): \`instar intent validate\`
1464
+ - Inspect the parsed structure: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org\`
1465
+
1450
1466
  ## Agent Infrastructure
1451
1467
 
1452
1468
  This project uses instar for persistent agent capabilities.
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/scaffold/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAuB;IACrD,OAAO,KAAK,QAAQ,CAAC,IAAI;;;;OAIpB,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI;;;;EAIpC,QAAQ,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;;;6BAsBO,QAAQ,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7C,CAAC;AAEF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,WAAmB,EAAE,QAAgB;IACrF,OAAO;;;;;;;;;;;;;;;;;;EAkBP,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDH,QAAQ;;;;;CAKjB,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,OAAO,KAAK,QAAQ;;;;;;;;;;;;;;4CAcsB,QAAQ;CACnD,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;IAChD,OAAO,KAAK,SAAS;;;;;;;;;;;;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;;;;;;;sEAY+C,IAAI;;CAEzE,CAAC;IAEA,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-05-22T03:55:48.253Z",
5
- "instarVersion": "1.2.21",
4
+ "generatedAt": "2026-05-22T05:51:10.506Z",
5
+ "instarVersion": "1.2.23",
6
6
  "entryCount": 191,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -11,7 +11,7 @@
11
11
  "domain": "identity",
12
12
  "sourcePath": "src/core/PostUpdateMigrator.ts",
13
13
  "installedPath": ".instar/hooks/instar/session-start.sh",
14
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
14
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
15
15
  "since": "2025-01-01"
16
16
  },
17
17
  "hook:dangerous-command-guard": {
@@ -20,7 +20,7 @@
20
20
  "domain": "safety",
21
21
  "sourcePath": "src/core/PostUpdateMigrator.ts",
22
22
  "installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
23
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
23
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
24
24
  "since": "2025-01-01"
25
25
  },
26
26
  "hook:grounding-before-messaging": {
@@ -29,7 +29,7 @@
29
29
  "domain": "safety",
30
30
  "sourcePath": "src/core/PostUpdateMigrator.ts",
31
31
  "installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
32
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
32
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
33
33
  "since": "2025-01-01"
34
34
  },
35
35
  "hook:compaction-recovery": {
@@ -38,7 +38,7 @@
38
38
  "domain": "identity",
39
39
  "sourcePath": "src/core/PostUpdateMigrator.ts",
40
40
  "installedPath": ".instar/hooks/instar/compaction-recovery.sh",
41
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
41
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
42
42
  "since": "2025-01-01"
43
43
  },
44
44
  "hook:external-operation-gate": {
@@ -47,7 +47,7 @@
47
47
  "domain": "safety",
48
48
  "sourcePath": "src/core/PostUpdateMigrator.ts",
49
49
  "installedPath": ".instar/hooks/instar/external-operation-gate.js",
50
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
50
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
51
51
  "since": "2025-01-01"
52
52
  },
53
53
  "hook:deferral-detector": {
@@ -56,7 +56,7 @@
56
56
  "domain": "safety",
57
57
  "sourcePath": "src/core/PostUpdateMigrator.ts",
58
58
  "installedPath": ".instar/hooks/instar/deferral-detector.js",
59
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
59
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
60
60
  "since": "2025-01-01"
61
61
  },
62
62
  "hook:post-action-reflection": {
@@ -65,7 +65,7 @@
65
65
  "domain": "evolution",
66
66
  "sourcePath": "src/core/PostUpdateMigrator.ts",
67
67
  "installedPath": ".instar/hooks/instar/post-action-reflection.js",
68
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
68
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
69
69
  "since": "2025-01-01"
70
70
  },
71
71
  "hook:external-communication-guard": {
@@ -74,7 +74,7 @@
74
74
  "domain": "safety",
75
75
  "sourcePath": "src/core/PostUpdateMigrator.ts",
76
76
  "installedPath": ".instar/hooks/instar/external-communication-guard.js",
77
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
77
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
78
78
  "since": "2025-01-01"
79
79
  },
80
80
  "hook:scope-coherence-collector": {
@@ -83,7 +83,7 @@
83
83
  "domain": "coherence",
84
84
  "sourcePath": "src/core/PostUpdateMigrator.ts",
85
85
  "installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
86
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
86
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
87
87
  "since": "2025-01-01"
88
88
  },
89
89
  "hook:scope-coherence-checkpoint": {
@@ -92,7 +92,7 @@
92
92
  "domain": "coherence",
93
93
  "sourcePath": "src/core/PostUpdateMigrator.ts",
94
94
  "installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
95
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
95
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
96
96
  "since": "2025-01-01"
97
97
  },
98
98
  "hook:free-text-guard": {
@@ -101,7 +101,7 @@
101
101
  "domain": "safety",
102
102
  "sourcePath": "src/core/PostUpdateMigrator.ts",
103
103
  "installedPath": ".instar/hooks/instar/free-text-guard.sh",
104
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
104
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
105
105
  "since": "2025-01-01"
106
106
  },
107
107
  "hook:claim-intercept": {
@@ -110,7 +110,7 @@
110
110
  "domain": "coherence",
111
111
  "sourcePath": "src/core/PostUpdateMigrator.ts",
112
112
  "installedPath": ".instar/hooks/instar/claim-intercept.js",
113
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
113
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
114
114
  "since": "2025-01-01"
115
115
  },
116
116
  "hook:claim-intercept-response": {
@@ -119,7 +119,7 @@
119
119
  "domain": "coherence",
120
120
  "sourcePath": "src/core/PostUpdateMigrator.ts",
121
121
  "installedPath": ".instar/hooks/instar/claim-intercept-response.js",
122
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
122
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
123
123
  "since": "2025-01-01"
124
124
  },
125
125
  "hook:auto-approve-permissions": {
@@ -128,7 +128,7 @@
128
128
  "domain": "safety",
129
129
  "sourcePath": "src/core/PostUpdateMigrator.ts",
130
130
  "installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
131
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
131
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
132
132
  "since": "2025-01-01"
133
133
  },
134
134
  "job:health-check": {
@@ -1472,7 +1472,7 @@
1472
1472
  "type": "subsystem",
1473
1473
  "domain": "updates",
1474
1474
  "sourcePath": "src/core/PostUpdateMigrator.ts",
1475
- "contentHash": "c05e308a956d13c08a2aecdbec64591b4a94ef3c083e4b4ce95202b03ebce284",
1475
+ "contentHash": "2f5fd2f22e14901a68a56add8044e3a85347ad3647630bbd0936b678fe79f1f0",
1476
1476
  "since": "2025-01-01"
1477
1477
  },
1478
1478
  "subsystem:scheduler": {
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Docs Coverage Audit
3
+ description: Weekly walk of the instar source tree against the docs surface. Surfaces newly-undocumented capabilities so docs don't drift between releases. Off by default — only useful on machines that have the instar source repo locally (instar developers, contributors). Operators who want it can flip enabled to true in `.instar/jobs/instar/docs-coverage-audit.md`.
4
+ schedule: "0 10 * * 1"
5
+ priority: medium
6
+ expectedDurationMinutes: 5
7
+ model: haiku
8
+ enabled: false
9
+ tags:
10
+ - cat:learning
11
+ - audit
12
+ - instar-dev-only
13
+ toolAllowlist: "*"
14
+ unrestrictedTools: true
15
+ ---
16
+ Run a weekly documentation coverage audit on the instar codebase. This job exists because docs drift between releases — features ship without doc updates, and the gap accumulates silently until someone notices. This audit catches the drift early.
17
+
18
+ The job:
19
+
20
+ 1. Locate the instar source repo on this machine. Try in order: the workspace dir from .instar/config.json under workspace.repoPath; ~/Documents/Projects/instar/; ~/.instar/agents/<self>/.worktrees/ (any subdirectory); or whatever path the operator has configured. If you cannot find the instar repo on this machine, send a short Telegram message saying so and exit — there's no audit to run.
21
+
22
+ 2. Run the coverage script from inside that repo: `node scripts/docs-coverage.mjs --json > /tmp/docs-coverage-this-week.json`. The script enumerates every shipped capability (routes, commands, jobs, hooks, skills, top-level classes per subsystem) and cross-references against site docs + README. It writes both a JSON inventory and a markdown report to .instar/docs-coverage.json and .instar/docs-coverage.md.
23
+
24
+ 3. Compare the new report to last week's. The previous week's report lives at .instar/state/docs-coverage-last-week.json if it exists. Use plain JSON diff logic — what's the delta in undocumented count per category? What capabilities are newly undocumented (existed before but lost their doc mention, or are brand-new in src/ without any doc)? What capabilities became newly documented (good news worth surfacing)?
25
+
26
+ 4. If the delta is interesting (any category gained ≥3 undocumented items OR any single category dropped below its CI floor OR the overall coverage dropped by ≥2 percentage points), send a Telegram message that's a quick, conversational heads-up. Lead with the headline: "Docs coverage dipped in [category]" or "Five new endpoints landed without doc mentions" or similar. Then list the specific items in plain language with their file paths. End with a one-line suggestion of where to add the missing doc (which file in site/src/content/docs/ is the natural home).
27
+
28
+ 5. If the delta is uninteresting (small fluctuations, churn that nets to zero, all categories still above floor), stay silent. Most weeks should be silent — that means the docs are keeping up.
29
+
30
+ 6. After surfacing (or not), save the current report as next week's baseline: copy /tmp/docs-coverage-this-week.json to .instar/state/docs-coverage-last-week.json.
31
+
32
+ 7. Optionally, if the script's --check mode would fail (any category below its CI floor), file a higher-priority signal via the degradation reporter — this is the case where the next PR will hit a CI failure unless someone fixes coverage first.
33
+
34
+ IMPORTANT: This is a guardian job, not a doer. Surface the drift and where to fix it, don't fix it yourself. The fix work belongs in a deliberate doc-update PR with proper review, not in an autonomous job run. If the drift is large, suggest the operator open a topic to scope the doc update — don't try to enumerate the full backlog in one Telegram message.
35
+
36
+ Plain English. No raw JSON in the message. No structured field names. The user reads these on their phone. Write like you're texting a teammate about a code-review observation.
@@ -1482,6 +1482,22 @@ Before answering ANY question about my capabilities or architecture from memory
1482
1482
  2. **If result says "block"** — STOP. You may be working on the wrong project for this topic.
1483
1483
  3. **If result says "warn"** — Pause and verify before proceeding.
1484
1484
 
1485
+ ### ORG-INTENT.md (Organizational Intent at Runtime)
1486
+
1487
+ If \`.instar/ORG-INTENT.md\` exists on disk, the Coherence Gate now reads it on every outbound message review and surfaces the three-rule contract to the value-alignment reviewer:
1488
+
1489
+ - **Constraints** are mandatory — violations are flagged with severity \`block\` and the message is blocked.
1490
+ - **Goals** are organizational defaults — contradictions warn or block (depending on severity).
1491
+ - **Values** shape representation — drift warns.
1492
+ - **Tradeoff hierarchy** resolves ties when two values pull in opposite directions; the earlier entry wins.
1493
+
1494
+ This means: writing an ORG-INTENT.md file actually changes how the agent's outbound messages are evaluated. Before this wiring, the file existed only as input to offline analyzers (\`instar intent validate\`, \`instar intent reflect\`).
1495
+
1496
+ Manage it:
1497
+ - Scaffold a starter: \`instar intent org-init "Your Org Name"\`
1498
+ - Validate agent intent against org intent (static analysis): \`instar intent validate\`
1499
+ - Inspect the parsed structure: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/intent/org\`
1500
+
1485
1501
  ## Agent Infrastructure
1486
1502
 
1487
1503
  This project uses instar for persistent agent capabilities.
@@ -0,0 +1,32 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: patch -->
4
+ <!-- patch = bug fixes, refactors, test additions, doc updates -->
5
+
6
+ ## What Changed
7
+
8
+ **feat(docs-coverage-weekly): weekly audit job + GitHub Actions cron that surface accumulated docs drift.**
9
+
10
+ Companion to the per-PR docs coverage gate that shipped in v1.2.21. The per-PR gate catches regression, but coverage can stagnate at the floor indefinitely if every PR just barely scrapes by. This release adds the trend-surface piece: a weekly check that catches accumulated drift even when the per-PR gate is satisfied.
11
+
12
+ Two delivery surfaces, both light and both off the critical path:
13
+
14
+ 1. **Job template** — `src/scaffold/templates/jobs/instar/docs-coverage-audit.md` ships as an agentmd job, `enabled: false` by default. Instar-developing agents (the ones with the instar source repo on their machine) can flip it to `true` in their local `.instar/jobs/instar/docs-coverage-audit.md`. Once enabled, the job runs every Monday at 10:00 local time, locates the instar source repo, executes the coverage script, compares to the prior week's baseline, and sends a Telegram heads-up if anything drifted in an interesting way. Most weeks stay silent — that means docs are keeping up.
15
+
16
+ 2. **CI workflow** — `.github/workflows/docs-coverage-weekly.yml` runs every Monday at 10:00 UTC against the main branch. Posts the weekly report as a comment on a standing tracking issue tagged `docs-coverage`. Creates the issue on first run; appends weekly thereafter. Provides a durable, GitHub-native ledger of how coverage moves over time.
17
+
18
+ Both surfaces are signals, not authorities. Neither fixes docs autonomously. The per-PR gate from v1.2.21 remains the authoritative regression check; these surface the trend.
19
+
20
+ Spec: `docs/specs/docs-coverage-weekly.md`. ELI16: `docs/specs/docs-coverage-weekly.eli16.md`. Side-effects review: `upgrades/side-effects/docs-coverage-weekly.md`.
21
+
22
+ ## What to Tell Your User
23
+
24
+ Nothing user-visible. The job is off by default and would only apply to agents that develop instar itself. The workflow runs in instar's own GitHub Actions, not the user's.
25
+
26
+ ## Summary of New Capabilities
27
+
28
+ This release adds a single new job template (off by default) and a single new CI workflow. Both target the instar-developer use case rather than the end-user agent. No new agent runtime behavior.
29
+
30
+ ## Evidence
31
+
32
+ The coverage script that both surfaces invoke was shipped and tested in v1.2.21. The job template was verified to parse with valid frontmatter. The workflow YAML validates against GitHub Actions schema. Both files were verified to install via existing pipelines: `installBuiltinJobs()` walks the templates directory on every install and update, and the workflow runs from `.github/workflows/` like every other workflow in the repo.
@@ -0,0 +1,50 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- bump: minor -->
4
+ <!-- minor = new capability (ORG-INTENT runtime gate). Aggregates docs(openclaw-t22) from PR #313 too. -->
5
+
6
+ ## What Changed
7
+
8
+ **feat(org-intent-runtime): wire `ORG-INTENT.md` into the Coherence Gate so organizational intent actually shapes outbound message review.**
9
+
10
+ The `ORG-INTENT.md` format, parser, CLI surface (`instar intent org-init`, `validate`, `reflect`), and HTTP routes (`GET /intent/org`, `/intent/validate`) shipped in v0.9.11. What did not ship was the runtime integration — the Coherence Gate that reviews every outbound message only knew about `ORG-INTENT.md` through a deterministic markdown extraction that produced a flat ~150-token blob. The structured three-rule contract (constraints mandatory, goals defaults, values shape, tradeoff hierarchy resolves ties) was invisible to the reviewer. An agent with a fully-authored `ORG-INTENT.md` on disk behaved identically to one without it.
11
+
12
+ Phase 1 of the org-intent runtime project closes that gap on the message-review surface:
13
+
14
+ 1. **Structured parser wired into the gate.** `loadValueDocs()` now invokes `OrgIntentManager.parse()` and stores the structured `{ name, constraints[], goals[], values[], tradeoffHierarchy[] }` shape alongside the legacy flat blob. Both are surfaced to reviewers; the structured form takes priority.
15
+ 2. **Three-rule contract enforced explicitly in the value-alignment reviewer prompt.** The prompt now says constraint violations MUST block; goal contradictions warn or block by severity; value drift warns; the tradeoff hierarchy resolves ties (earlier entry wins). Constraints, goals, values, and tradeoff hierarchy appear in the prompt as separate labeled sections rather than a mashed-up blob.
16
+ 3. **Criticality auto-promotion.** When `ORG-INTENT.md` contains constraints, the value-alignment reviewer is auto-promoted to `high` criticality. Timeouts on external channels now fail-closed for this reviewer instead of slipping through unreviewed.
17
+ 4. **Migration parity.** Existing agents' CLAUDE.md gains an "ORG-INTENT.md (Organizational Intent at Runtime)" subsection in the Coherence Gate section so the agent learns the file is now load-bearing. The migration is idempotent — re-runs are no-ops.
18
+
19
+ Spec: `docs/specs/ORG-INTENT-RUNTIME-GATE-SPEC.md`. ELI16 companion: `docs/specs/ORG-INTENT-RUNTIME-GATE-SPEC.eli16.md`. Side-effects review: `upgrades/side-effects/org-intent-runtime-gate.md`.
20
+
21
+ This is Phase 1 of a four-phase project; the remaining phases (session-start injection, tradeoff helper, drift detection job) are deferred to subsequent releases.
22
+
23
+ ---
24
+
25
+ **Also included: docs(openclaw-t22) — codex framework limitation documented.**
26
+
27
+ Spec note added to `docs/specs/OPENCLAW-IMPORT-BEFORE-PROMPT-BUILD-SPEC.md` acknowledging that the pre-prompt memory recall feature (T2.2) only fires on Claude Code sessions. Codex CLI does not expose an equivalent per-prompt hook, so on codex-configured topics the recall pass does not run. This is a documented v1 scope choice surfaced by the 2026-05-21 OpenClaw v1.0 re-audit in topic 9003. The ELI16 companion was updated in plain language so operators understand the limitation before enabling the feature on a codex-configured topic.
28
+
29
+ ## What to Tell Your User
30
+
31
+ If your agent already has an organizational intent file on disk (ORG-INTENT.md in the .instar directory), this release makes that file actually load-bearing for the first time. The agent's outbound message review now consults the structured constraints, goals, values, and tradeoff hierarchy — and will block messages that violate the constraints you wrote. Review the file before the upgrade lands, because constraints you wrote loosely now have real teeth.
32
+
33
+ If you have not authored an organizational intent file, behavior is unchanged. This is a zero-cost upgrade for those agents.
34
+
35
+ A second change in this release (the openclaw-t22 docs note): if you have a Telegram topic configured for the Codex CLI framework, the pre-prompt memory recall feature does not fire on that topic. This is a documented limitation, not a bug.
36
+
37
+ ## Summary of New Capabilities
38
+
39
+ - **ORG-INTENT.md is now a runtime input to the Coherence Gate.** Three-rule contract enforcement: constraints block, goals warn/block, values warn, tradeoff hierarchy resolves ties.
40
+ - **Value-alignment reviewer prompt** is rewritten to surface the structured contract as separate labeled sections, explicitly enforcing constraint-vs-goal-vs-value semantics.
41
+ - **Migration parity**: existing agents pick up the change automatically via `PostUpdateMigrator.migrateClaudeMd()` — the CLAUDE.md Coherence Gate section gains a new subsection so the agent knows the file is load-bearing.
42
+ - **Three new test suites** added to enforce the wiring at all three tiers (unit, integration, E2E).
43
+
44
+ ## Evidence
45
+
46
+ - Tier 1 unit tests: `tests/unit/CoherenceGate.test.ts` (5 new tests under the "ORG-INTENT.md structured loading" describe block, all passing). `tests/unit/PostUpdateMigrator-org-intent-runtime.test.ts` (5 new tests for migration parity, all passing).
47
+ - Tier 2 integration tests: `tests/integration/coherence-gate-org-intent.test.ts` (4 tests against the live `/review/evaluate` HTTP route, all passing).
48
+ - Tier 3 E2E lifecycle tests: `tests/e2e/org-intent-runtime-lifecycle.test.ts` (4 tests mirroring production wiring from `src/commands/server.ts`, all passing — including the "feature is alive" check that returns 200, not 503).
49
+ - Type-check: `npx tsc --noEmit` clean.
50
+ - The full test suite must remain green before merge per Zero-Failure Standard.
@@ -0,0 +1,74 @@
1
+ # Side-effects review — docs-coverage-weekly
2
+
3
+ Spec: `docs/specs/docs-coverage-weekly.md`
4
+ ELI16: `docs/specs/docs-coverage-weekly.eli16.md`
5
+ Companion to: `docs/specs/docs-coverage.md` (the underlying script + per-PR CI gate)
6
+
7
+ ## Surface map
8
+
9
+ | Change | File | Type |
10
+ |---|---|---|
11
+ | New job template | `src/scaffold/templates/jobs/instar/docs-coverage-audit.md` | `agentmd` job, `enabled: false` by default. Distributed via `installBuiltinJobs()` on `instar init` and on every update via `PostUpdateMigrator` |
12
+ | New CI workflow | `.github/workflows/docs-coverage-weekly.yml` | GitHub Actions cron workflow, Mondays at 10:00 UTC |
13
+
14
+ No production code touched. No agent behavior changes at runtime unless an operator explicitly enables the job.
15
+
16
+ ## Over-block analysis
17
+
18
+ **Could the job spam an operator?**
19
+
20
+ The job ships `enabled: false`. Operators with the instar source repo on their machine can flip it to `true` in `.instar/jobs/instar/docs-coverage-audit.md`. The job's first action is to locate the instar source repo; if it can't find one, it sends a short message and exits — and the operator can disable the job again. So the worst case is one Telegram message before the operator turns it back off.
21
+
22
+ When enabled and working correctly, the job stays silent most weeks. The delta thresholds (≥3 newly-undocumented items in a category, any category below CI floor, ≥2-point overall drop) ensure that only meaningful drift surfaces a message.
23
+
24
+ **Could the CI workflow spam an issue tracker?**
25
+
26
+ The workflow opens or updates one standing issue tagged `docs-coverage` and appends weekly reports as comments. If the issue is closed by a maintainer (signaling "stop tracking this"), the workflow creates a new one on the next run. This is the desired behavior — closing the issue is the soft way to say "I'm aware, I'll re-engage later." Comments accumulate on a single issue rather than creating a new issue per run.
27
+
28
+ **Could the CI workflow fail and block other CI?**
29
+
30
+ No. The workflow is its own job in its own file with no dependencies on other workflows. A failure is visible in the Actions UI but doesn't gate any other PR or push.
31
+
32
+ ## Under-block analysis
33
+
34
+ **What does the weekly audit NOT catch?**
35
+
36
+ - Same content-quality limitations as the per-PR coverage check — a documented capability with completely wrong content still counts as documented. The audit catches enumeration drift, not comprehension drift.
37
+ - Doesn't catch capabilities that exist outside the enumerated locations (e.g. an exported class moved to a directory the script doesn't walk). This is a deliberate scope choice; the alternative is walking everything and producing noise.
38
+ - Doesn't catch deleted docs that should still exist (the script measures coverage of what's in code; if code AND docs both lose a capability, neither shows up as drift).
39
+
40
+ ## Level-of-abstraction fit
41
+
42
+ The job lives in `src/scaffold/templates/jobs/instar/` alongside the other default jobs. The CI workflow lives in `.github/workflows/` alongside other workflows. Both are at the right level: the job is at the agent-behavior layer (something the agent does), and the workflow is at the project-infrastructure layer (something the project does to itself).
43
+
44
+ The script they both invoke (`scripts/docs-coverage.mjs`) was deliberately built first as a separate concern. This change layers two delivery mechanisms on top of it without modifying the script. If the cadence needs to change (daily, monthly), the script doesn't care.
45
+
46
+ ## Signal-vs-authority compliance
47
+
48
+ Both surfaces are **signals**. Neither has authority to fail a build or block work. The per-PR coverage check from the docs-coverage spec is the authoritative gate. The weekly job and the weekly workflow are loud heads-ups, but they can't refuse to ship anything. The separation matches how other signal/authority pairs work in instar.
49
+
50
+ ## Interactions with existing systems
51
+
52
+ - **`installBuiltinJobs()`** — picks up the new `docs-coverage-audit.md` template on every install/update. Existing agents get the template (off by default) on their next update via `PostUpdateMigrator`. No separate migration code needed because `installBuiltinJobs` already overwrites built-in templates idempotently.
53
+ - **Scheduler** — sees the new job. With `enabled: false`, the scheduler reads it on startup but doesn't schedule it for execution. No CPU cost.
54
+ - **GitHub Actions cron** — runs in the same project as other workflows but in its own job and on its own schedule. Doesn't share state with any per-PR workflow.
55
+ - **Telegram adapter** — the job uses the same `telegram-reply.sh` path every other job uses for outbound messages. No new adapter integration.
56
+ - **Docs-coverage script** — invoked via `node scripts/docs-coverage.mjs`. The script is deterministic and idempotent, safe to run repeatedly.
57
+
58
+ ## Rollback cost
59
+
60
+ Trivially reversible. Remove the two added files. Existing agents lose the template on their next update; the workflow stops running on the next merge.
61
+
62
+ ## Risk summary
63
+
64
+ - **Low risk of regression.** Pure additions. Job is off by default; workflow runs independently of any other workflow.
65
+ - **Low risk of friction.** Job stays silent most weeks. Workflow posts to one standing issue rather than spraying alerts.
66
+ - **No risk of data loss.** Both surfaces are read-only against the codebase.
67
+
68
+ ## Verification done before commit
69
+
70
+ - Job template parses correctly (verified via reading frontmatter in test fashion).
71
+ - CI workflow YAML validates against GitHub Actions schema (manual review).
72
+ - The underlying script (shipped in the docs-coverage spec) is already tested and verified — no changes needed.
73
+ - `enabled: false` confirmed in the template so this lands silently for existing agents.
74
+ - Distribution path verified: `installBuiltinJobs()` walks `templates/jobs/instar/` and installs all `.md` files regardless of `enabled` flag, so the file reaches every agent on update; the `enabled: false` controls whether the scheduler runs it.