instar 1.3.322 → 1.3.324
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 +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +64 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/core/AgentPassport.d.ts +50 -0
- package/dist/core/AgentPassport.d.ts.map +1 -0
- package/dist/core/AgentPassport.js +70 -0
- package/dist/core/AgentPassport.js.map +1 -0
- package/dist/core/AgentReadinessScorer.d.ts +54 -0
- package/dist/core/AgentReadinessScorer.d.ts.map +1 -0
- package/dist/core/AgentReadinessScorer.js +110 -0
- package/dist/core/AgentReadinessScorer.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +38 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +9 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +18 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +87 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +63 -63
- package/src/scaffold/templates.ts +9 -0
- package/upgrades/1.3.323.md +54 -0
- package/upgrades/1.3.324.md +51 -0
- package/upgrades/side-effects/exo3-g2-ci-greening.md +35 -0
- package/upgrades/side-effects/exo3-g3-ci-greening.md +31 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentPassport — the EXO 3.0 "digital passport" (Salim Ismail, "The 80-Year
|
|
3
|
+
* Business Rule AI Just Broke"): "every AI agent gets a digital passport with
|
|
4
|
+
* metadata saying what it's allowed to do and what it's not allowed to do, and
|
|
5
|
+
* other AI agents watching that it's complying."
|
|
6
|
+
*
|
|
7
|
+
* Instar already has the primitives — agent identity (name + routing
|
|
8
|
+
* fingerprint), a trust level, and ORG-INTENT constraints (forbidden actions).
|
|
9
|
+
* This module PACKAGES them into one explicit, portable passport object plus a
|
|
10
|
+
* deterministic `permits()` check, so a peer agent can read a passport and
|
|
11
|
+
* decide whether to trust a proposed action BEFORE it happens. Deterministic +
|
|
12
|
+
* advisory; the caller decides what to do with the verdict.
|
|
13
|
+
*/
|
|
14
|
+
// ── Helpers (keyword overlap, shared shape with IntentTestHarness) ───
|
|
15
|
+
const STOP = new Set(['the', 'a', 'an', 'to', 'of', 'for', 'with', 'and', 'or', 'any', 'that', 'this', 'is', 'are', 'be', 'on', 'in', 'it', 'its', 'our', 'your', 'their', 'all', 'from', 'by']);
|
|
16
|
+
function normalize(t) {
|
|
17
|
+
return t.toLowerCase().replace(/[^a-z0-9\s]/g, ' ').replace(/\s+/g, ' ').trim();
|
|
18
|
+
}
|
|
19
|
+
function words(s) {
|
|
20
|
+
return normalize(s).split(' ').filter((w) => w.length > 2 && !STOP.has(w));
|
|
21
|
+
}
|
|
22
|
+
function overlap(a, b) {
|
|
23
|
+
const wa = words(a), wb = words(b);
|
|
24
|
+
if (!wa.length || !wb.length)
|
|
25
|
+
return 0;
|
|
26
|
+
const setB = new Set(wb);
|
|
27
|
+
return wa.filter((w) => setB.has(w)).length / Math.min(wa.length, wb.length);
|
|
28
|
+
}
|
|
29
|
+
const MATCH = 0.6;
|
|
30
|
+
// Trust floors: an untrusted passport may only read/observe; supervised+ may act.
|
|
31
|
+
const ACTING_VERBS = ['wire', 'send', 'delete', 'deploy', 'pay', 'publish', 'transfer', 'modify', 'write', 'execute', 'purchase', 'sign'];
|
|
32
|
+
function isActing(action) {
|
|
33
|
+
const w = new Set(words(action));
|
|
34
|
+
return ACTING_VERBS.some((v) => w.has(v));
|
|
35
|
+
}
|
|
36
|
+
// ── Public API ───────────────────────────────────────────────────────
|
|
37
|
+
export function buildPassport(input) {
|
|
38
|
+
return {
|
|
39
|
+
version: 1,
|
|
40
|
+
agent: input.agent,
|
|
41
|
+
fingerprint: input.fingerprint,
|
|
42
|
+
trustLevel: input.trustLevel ?? 'supervised',
|
|
43
|
+
allowedCapabilities: input.allowedCapabilities ?? [],
|
|
44
|
+
forbiddenActions: input.forbiddenActions ?? [],
|
|
45
|
+
issuedAt: input.issuedAt,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The compliance check a peer runs against a passport before trusting an action.
|
|
50
|
+
* Order: forbidden-action (hard no) → trust-floor (untrusted can't act) →
|
|
51
|
+
* capability-scope (if scoped, the action must be in scope) → ok.
|
|
52
|
+
*/
|
|
53
|
+
export function permits(passport, action) {
|
|
54
|
+
for (const f of passport.forbiddenActions) {
|
|
55
|
+
if (overlap(action, f) >= MATCH) {
|
|
56
|
+
return { permitted: false, basis: 'forbidden-action', reason: `Forbidden by the passport: "${f}".`, matched: f };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (passport.trustLevel === 'untrusted' && isActing(action)) {
|
|
60
|
+
return { permitted: false, basis: 'trust-floor', reason: 'Untrusted passport may observe but not act.' };
|
|
61
|
+
}
|
|
62
|
+
if (passport.allowedCapabilities.length > 0) {
|
|
63
|
+
const inScope = passport.allowedCapabilities.some((c) => overlap(action, c) >= MATCH);
|
|
64
|
+
if (!inScope) {
|
|
65
|
+
return { permitted: false, basis: 'out-of-scope', reason: 'Action is outside the passport\'s allowed capabilities.' };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return { permitted: true, basis: 'ok', reason: 'Permitted: violates no forbidden action and is within scope.' };
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=AgentPassport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentPassport.js","sourceRoot":"","sources":["../../src/core/AgentPassport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqCH,wEAAwE;AAExE,MAAM,IAAI,GAAG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;QACnH,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,UAAU,KAAK,WAAW,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,6CAA6C,EAAE,CAAC;IAC3G,CAAC;IACD,IAAI,QAAQ,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;QACtF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,yDAAyD,EAAE,CAAC;QACxH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,8DAA8D,EAAE,CAAC;AAClH,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentReadinessScorer — Salim Ismail's "task decomposition matrix" (EXO 3.0).
|
|
3
|
+
*
|
|
4
|
+
* EXO 3.0's central diagnostic: score work on its COORDINATION-vs-JUDGMENT ratio.
|
|
5
|
+
* Coordination work — routing information, approvals, scheduling, status
|
|
6
|
+
* tracking, prescriptive/standardized steps — is what AI agents do best, so it's
|
|
7
|
+
* "agent-ready." Judgment work — resolving ambiguity, handling exceptions,
|
|
8
|
+
* navigating relationships, making a call with no playbook — should stay with
|
|
9
|
+
* (or escalate to) humans. Salim: "every task that scores high on coordination
|
|
10
|
+
* has agent readiness — deploy an agent there this week."
|
|
11
|
+
*
|
|
12
|
+
* This is a deterministic, heuristic scorer (no LLM): it counts coordination vs
|
|
13
|
+
* judgment signal words in a task/workflow description and returns a 0–100
|
|
14
|
+
* readiness score with a recommendation. Deterministic so it's testable and so
|
|
15
|
+
* two readers get the same score. Callers may add an LLM pass on top; the core
|
|
16
|
+
* here is pure.
|
|
17
|
+
*/
|
|
18
|
+
export interface TaskInput {
|
|
19
|
+
/** Short task name. */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** Free-text description of the work. */
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkflowInput {
|
|
25
|
+
/** Ordered step descriptions. */
|
|
26
|
+
steps: string[];
|
|
27
|
+
name?: string;
|
|
28
|
+
}
|
|
29
|
+
export type Recommendation = 'deploy-agent' | 'agent-with-oversight' | 'hybrid' | 'human-led';
|
|
30
|
+
export interface ReadinessScore {
|
|
31
|
+
/** Count of coordination signals found. */
|
|
32
|
+
coordinationSignals: number;
|
|
33
|
+
/** Count of judgment signals found. */
|
|
34
|
+
judgmentSignals: number;
|
|
35
|
+
/** coordination / (coordination + judgment); 0..1. 0.5 when no signals. */
|
|
36
|
+
coordinationRatio: number;
|
|
37
|
+
/** 0–100 agent-readiness. Higher = better agent candidate. */
|
|
38
|
+
overallReadiness: number;
|
|
39
|
+
recommendation: Recommendation;
|
|
40
|
+
/** Human-readable explanation. */
|
|
41
|
+
reason: string;
|
|
42
|
+
/** The distinct signal words that matched, for transparency. */
|
|
43
|
+
matched: {
|
|
44
|
+
coordination: string[];
|
|
45
|
+
judgment: string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export declare class AgentReadinessScorer {
|
|
49
|
+
/** Score a single task on its coordination-vs-judgment ratio. */
|
|
50
|
+
score(task: TaskInput): ReadinessScore;
|
|
51
|
+
/** Score a workflow (all steps combined). */
|
|
52
|
+
scoreWorkflow(workflow: WorkflowInput): ReadinessScore;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=AgentReadinessScorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentReadinessScorer.d.ts","sourceRoot":"","sources":["../../src/core/AgentReadinessScorer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,WAAW,SAAS;IACxB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,sBAAsB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE9F,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,OAAO,EAAE;QAAE,YAAY,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACzD;AA0FD,qBAAa,oBAAoB;IAC/B,iEAAiE;IACjE,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,cAAc;IAItC,6CAA6C;IAC7C,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,cAAc;CAGvD"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentReadinessScorer — Salim Ismail's "task decomposition matrix" (EXO 3.0).
|
|
3
|
+
*
|
|
4
|
+
* EXO 3.0's central diagnostic: score work on its COORDINATION-vs-JUDGMENT ratio.
|
|
5
|
+
* Coordination work — routing information, approvals, scheduling, status
|
|
6
|
+
* tracking, prescriptive/standardized steps — is what AI agents do best, so it's
|
|
7
|
+
* "agent-ready." Judgment work — resolving ambiguity, handling exceptions,
|
|
8
|
+
* navigating relationships, making a call with no playbook — should stay with
|
|
9
|
+
* (or escalate to) humans. Salim: "every task that scores high on coordination
|
|
10
|
+
* has agent readiness — deploy an agent there this week."
|
|
11
|
+
*
|
|
12
|
+
* This is a deterministic, heuristic scorer (no LLM): it counts coordination vs
|
|
13
|
+
* judgment signal words in a task/workflow description and returns a 0–100
|
|
14
|
+
* readiness score with a recommendation. Deterministic so it's testable and so
|
|
15
|
+
* two readers get the same score. Callers may add an LLM pass on top; the core
|
|
16
|
+
* here is pure.
|
|
17
|
+
*/
|
|
18
|
+
// ── Signal lexicons (EXO 3.0's coordination vs judgment) ─────────────
|
|
19
|
+
const COORDINATION_SIGNALS = [
|
|
20
|
+
'route', 'routing', 'approve', 'approval', 'schedule', 'scheduling', 'track',
|
|
21
|
+
'tracking', 'status', 'forward', 'collect', 'compile', 'notify', 'notification',
|
|
22
|
+
'sync', 'reconcile', 'data entry', 'standardized', 'standard', 'prescriptive',
|
|
23
|
+
'repetitive', 'template', 'report', 'reporting', 'log', 'logging', 'aggregate',
|
|
24
|
+
'summarize', 'dispatch', 'assign', 'update', 'fill', 'submit', 'process',
|
|
25
|
+
'checklist', 'rote', 'transcribe', 'categorize', 'sort', 'lookup', 'fetch',
|
|
26
|
+
];
|
|
27
|
+
const JUDGMENT_SIGNALS = [
|
|
28
|
+
'ambiguity', 'ambiguous', 'exception', 'judgment', 'judgement', 'negotiate',
|
|
29
|
+
'negotiation', 'relationship', 'ethical', 'ethics', 'creative', 'strategy',
|
|
30
|
+
'strategic', 'novel', 'sensitive', 'escalate', 'escalation', 'tradeoff',
|
|
31
|
+
'trade-off', 'nuance', 'nuanced', 'discretion', 'interpret', 'interpretation',
|
|
32
|
+
'persuade', 'empathy', 'conflict', 'unprecedented', 'no playbook', 'gut',
|
|
33
|
+
'intuition', 'priorit', 'weigh', 'decide', 'decision', 'design', 'invent',
|
|
34
|
+
];
|
|
35
|
+
const READINESS_THRESHOLDS = {
|
|
36
|
+
deployAgent: 75, // strongly coordination-dominant
|
|
37
|
+
agentWithOversight: 55, // coordination-leaning
|
|
38
|
+
hybrid: 40, // mixed
|
|
39
|
+
};
|
|
40
|
+
// ── Helpers ──────────────────────────────────────────────────────────
|
|
41
|
+
function normalize(text) {
|
|
42
|
+
return ` ${text.toLowerCase().replace(/[^a-z0-9\s-]/g, ' ').replace(/\s+/g, ' ').trim()} `;
|
|
43
|
+
}
|
|
44
|
+
/** Distinct signal words present in the text (word-boundary-ish substring). */
|
|
45
|
+
function findSignals(normText, lexicon) {
|
|
46
|
+
const found = new Set();
|
|
47
|
+
for (const sig of lexicon) {
|
|
48
|
+
// match as a whole word / phrase (padded text guarantees boundaries)
|
|
49
|
+
if (normText.includes(` ${sig}`) || normText.includes(`${sig} `) || normText.includes(`${sig}`)) {
|
|
50
|
+
// require the signal to appear bounded to avoid e.g. 'log' in 'logical'
|
|
51
|
+
const re = new RegExp(`(^|[^a-z])${sig.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}([^a-z]|$)`);
|
|
52
|
+
if (re.test(normText))
|
|
53
|
+
found.add(sig);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return [...found];
|
|
57
|
+
}
|
|
58
|
+
function recommend(readiness, coordinationSignals, judgmentSignals) {
|
|
59
|
+
if (coordinationSignals === 0 && judgmentSignals === 0)
|
|
60
|
+
return 'hybrid';
|
|
61
|
+
if (readiness >= READINESS_THRESHOLDS.deployAgent)
|
|
62
|
+
return 'deploy-agent';
|
|
63
|
+
if (readiness >= READINESS_THRESHOLDS.agentWithOversight)
|
|
64
|
+
return 'agent-with-oversight';
|
|
65
|
+
if (readiness >= READINESS_THRESHOLDS.hybrid)
|
|
66
|
+
return 'hybrid';
|
|
67
|
+
return 'human-led';
|
|
68
|
+
}
|
|
69
|
+
function scoreText(text) {
|
|
70
|
+
const norm = normalize(text);
|
|
71
|
+
const coordination = findSignals(norm, COORDINATION_SIGNALS);
|
|
72
|
+
const judgment = findSignals(norm, JUDGMENT_SIGNALS);
|
|
73
|
+
const c = coordination.length;
|
|
74
|
+
const j = judgment.length;
|
|
75
|
+
const total = c + j;
|
|
76
|
+
const coordinationRatio = total === 0 ? 0.5 : c / total;
|
|
77
|
+
const overallReadiness = Math.round(coordinationRatio * 100);
|
|
78
|
+
const recommendation = recommend(overallReadiness, c, j);
|
|
79
|
+
const reason = total === 0
|
|
80
|
+
? 'No clear coordination or judgment signals — describe the work in more detail to score it.'
|
|
81
|
+
: `${c} coordination signal(s) vs ${j} judgment signal(s) → ${overallReadiness}/100 agent-readiness. ` +
|
|
82
|
+
(recommendation === 'deploy-agent'
|
|
83
|
+
? 'Coordination-dominant — a strong agent candidate; deploy with human-on-the-loop oversight.'
|
|
84
|
+
: recommendation === 'agent-with-oversight'
|
|
85
|
+
? 'Coordination-leaning — deploy an agent but keep a human validating exceptions.'
|
|
86
|
+
: recommendation === 'hybrid'
|
|
87
|
+
? 'Mixed — split the coordination parts to an agent and keep the judgment calls human.'
|
|
88
|
+
: 'Judgment-dominant — keep this human-led; the agent should only assist.');
|
|
89
|
+
return {
|
|
90
|
+
coordinationSignals: c,
|
|
91
|
+
judgmentSignals: j,
|
|
92
|
+
coordinationRatio,
|
|
93
|
+
overallReadiness,
|
|
94
|
+
recommendation,
|
|
95
|
+
reason,
|
|
96
|
+
matched: { coordination, judgment },
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
// ── Public API ───────────────────────────────────────────────────────
|
|
100
|
+
export class AgentReadinessScorer {
|
|
101
|
+
/** Score a single task on its coordination-vs-judgment ratio. */
|
|
102
|
+
score(task) {
|
|
103
|
+
return scoreText([task.name ?? '', task.description].join('. '));
|
|
104
|
+
}
|
|
105
|
+
/** Score a workflow (all steps combined). */
|
|
106
|
+
scoreWorkflow(workflow) {
|
|
107
|
+
return scoreText([workflow.name ?? '', ...workflow.steps].join('. '));
|
|
108
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+2708,34 @@ Rule: I do not state that work landed inside another agent's state unless I have
|
|
|
2708
2708
|
patched = true;
|
|
2709
2709
|
result.upgraded.push('CLAUDE.md: added Session Boot Self-Knowledge section');
|
|
2710
2710
|
}
|
|
2711
|
+
// Agent-Readiness Scoring (EXO 3.0 G2): the coordination-vs-judgment
|
|
2712
|
+
// diagnostic. Existing agents need to know /agent-readiness/score exists
|
|
2713
|
+
// before delegating work. Content-sniffed on a distinctive marker.
|
|
2714
|
+
if (!content.includes('Agent-Readiness Scoring (EXO 3.0')) {
|
|
2715
|
+
const agentReadinessSection = `
|
|
2716
|
+
**Agent-Readiness Scoring (EXO 3.0 task-decomposition matrix).** Score a task or workflow on its coordination-vs-judgment ratio to decide whether it's a good agent candidate. Coordination work (routing, approvals, scheduling, status-tracking, prescriptive steps) is agent-ready; judgment work (ambiguity, exceptions, relationships, no-playbook calls) stays human.
|
|
2717
|
+
- \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"task":{"description":"Route invoices, schedule approvals, track status"}}' http://localhost:${port}/agent-readiness/score\` (or \`{"workflow":{"steps":[...]}}\`) → \`{ coordinationRatio, overallReadiness (0-100), recommendation, matched }\`. \`recommendation\`: deploy-agent (75+) / agent-with-oversight (55-74) / hybrid (40-54) / human-led (<40). Deterministic + advisory.
|
|
2718
|
+
- **When to use** (PROACTIVE): before delegating a task/workflow to an agent, or when deciding what to automate vs keep human. Skill: \`/agent-readiness\`.
|
|
2719
|
+
`;
|
|
2720
|
+
content += '\n' + agentReadinessSection;
|
|
2721
|
+
patched = true;
|
|
2722
|
+
result.upgraded.push('CLAUDE.md: added Agent-Readiness Scoring section');
|
|
2723
|
+
}
|
|
2724
|
+
// Agent Digital Passport (EXO 3.0 G3): identity + trust + ORG-INTENT
|
|
2725
|
+
// constraints packaged portably, with a peer compliance check. Existing
|
|
2726
|
+
// agents need /passport + /passport/verify awareness before trusting a
|
|
2727
|
+
// peer's proposed action. Content-sniffed on a distinctive marker.
|
|
2728
|
+
if (!content.includes('Agent Digital Passport (EXO 3.0')) {
|
|
2729
|
+
const agentPassportSection = `
|
|
2730
|
+
**Agent Digital Passport (EXO 3.0).** Your identity (name + routing fingerprint), trust level, and ORG-INTENT constraints packaged into one portable passport — "every agent carries metadata saying what it's allowed and forbidden to do, and other agents watch compliance" (Salim Ismail).
|
|
2731
|
+
- Your passport: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/passport\` → \`{ agent, fingerprint, trustLevel, allowedCapabilities, forbiddenActions, issuedAt }\` (forbiddenActions = your ORG-INTENT constraints).
|
|
2732
|
+
- Verify a peer's action against their passport: \`curl -X POST -H "Authorization: Bearer $AUTH" -H 'Content-Type: application/json' -d '{"passport":{...},"action":"..."}' http://localhost:${port}/passport/verify\` → \`{ permitted, basis, reason }\` (basis: forbidden-action / trust-floor / out-of-scope / ok).
|
|
2733
|
+
- **When to use** (PROACTIVE): before trusting another agent's proposed action, verify it against their passport; hand peers your passport so they know your scope. Skill: \`/agent-passport\`.
|
|
2734
|
+
`;
|
|
2735
|
+
content += '\n' + agentPassportSection;
|
|
2736
|
+
patched = true;
|
|
2737
|
+
result.upgraded.push('CLAUDE.md: added Agent Digital Passport section');
|
|
2738
|
+
}
|
|
2711
2739
|
// Apprenticeship Program (Step 1, APPRENTICESHIP-STEP1-PROGRAM-SCAFFOLD-SPEC.md).
|
|
2712
2740
|
// Existing agents need to know the program registry + lifecycle gates exist —
|
|
2713
2741
|
// an agent that doesn't know about a capability effectively doesn't have it.
|
|
@@ -4302,6 +4330,16 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
4302
4330
|
// actions. Marker omits the trailing punctuation so it matches both the
|
|
4303
4331
|
// template variant ("…tests (Phase 5).") and the migrator variant ("…tests.").
|
|
4304
4332
|
'**MTP Protocol — the two EXO 3.0 tests',
|
|
4333
|
+
// Agent-Readiness Scoring (EXO 3.0 G2): the coordination-vs-judgment
|
|
4334
|
+
// diagnostic. A Codex/Gemini agent that never learns
|
|
4335
|
+
// /agent-readiness/score can't run the task-decomposition matrix before
|
|
4336
|
+
// delegating work.
|
|
4337
|
+
'**Agent-Readiness Scoring (EXO 3.0',
|
|
4338
|
+
// Agent Digital Passport (EXO 3.0 G3): portable identity + trust +
|
|
4339
|
+
// constraints, with a peer compliance check. A Codex/Gemini agent that
|
|
4340
|
+
// never learns /passport/verify can't check a peer's proposed action
|
|
4341
|
+
// against its passport before trusting it.
|
|
4342
|
+
'**Agent Digital Passport (EXO 3.0',
|
|
4305
4343
|
];
|
|
4306
4344
|
for (const shadowName of ['AGENTS.md', 'GEMINI.md']) {
|
|
4307
4345
|
const shadowPath = path.join(this.config.projectDir, shadowName);
|