@inventarch/compliance 1.2.0 → 2.0.0

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/SPEC.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Evaluator catalog extension: the producer side of trusted evaluator catalog and obligations is implemented by C25–C29 below (EVAL-01..04, OBL-01..03 including the strict-typing-v1 profile mapping; qualification cases EVAL-Q01, Q02, Q07 and Q08, and the producer side of Q03, in tests/evaluator-catalog.test.ts). It is explicit and optional: calls without a catalog keep the built-in-only behavior, and unknown check.runs ids still refuse. Still open and owned elsewhere: the API transactional controller and managed transition seam (spec §4, LK-06), the ia-apps fixed-to-catalog consumer (LK-05), the consumer-side cases EVAL-Q04–Q06 (late edit/reevaluation, concurrent workers and durable intent, silent agents), the consumer side of EVAL-Q03 (a real compiler evaluator and excluded-source detection). No scheduler, execution, persistence or native word is added here.
4
4
 
5
- Status: implemented through stage C and the D/R/E integration clauses C21–C23. Task evidence below is chronological; statements of later work within early checkpoints describe that checkpoint only. Shared owners: systems design sections 3–5 and language section 4.3.
5
+ Status: implemented through stage C and the D/R/E integration clause C21; the projection clauses C22–C24 are retired (below). Task evidence below is chronological; statements of later work within early checkpoints describe that checkpoint only. Shared owners: systems design sections 3–5 and language section 4.3.
6
6
 
7
7
  ## Instance schemas
8
8
 
@@ -76,11 +76,7 @@ C21 (database admission integration). The report assembler may receive prior fai
76
76
 
77
77
  C21 delivered with database Task2: report options accept prior non-pass admission observations, coalesce identical check/scope at the worst outcome and deduplicate findings. Candidate-only passes are ignored. The regression test retains removed-subject evidence without duplicate verdicts.
78
78
 
79
- C22. renderHostArtifacts projects admitted systems and their steward declarations into language-reference host artifacts. It validates revision-bound membership and unique host-safe identities. No named authoring procedure or expert methodology is required.
80
-
81
- C23. Stage E projections additionally cite and render unconditional cells of the steward's domain playbooks, in stable identity order. Since plan 2026-09-24 §0.1 these are the playbooks the steward `uses` plus those its profile's capabilities list, not every playbook physically in the steward folder; tools/projections/SPEC.md P05-P10 own the steward composition, block-clause and host-table rules. This exposes specialised operation methods without replacing the shared24-cell method. Conditional instructions are not silently rendered as unconditional.
82
-
83
- C24 (PT1 source subset). `renderHostArtifacts(records, revision, membership?)` accepts optional `ProjectionMembership`: the matching revision and unique `{path, system, root}` observations for every source path in the supplied admitted view, with both system/root null outside physical system folders. The composition root obtains these through public db `systemMember`; compliance never imports db or resolves source mounts. Validate observations against supplied records, canonical relative paths, direct declaration location and unique system/steward occurrences. Associate admitted project contributions by logical system membership across physical roots; retain exact adopted citations and mark adopted definitions immutable. Missing/stale/conflicting observations or required scope-excluded records refuse with the existing single projection diagnostic and no partial output. The two-argument compatibility form supports only the existing authored local layout; adopted callers supply observations. Equal local inputs preserve artifact bytes. This does not implement resource loading, arbitrary plugin compilation or installed-generation admission.
79
+ C22–C24 (the host projection renderers renderHostArtifacts and renderWorkspaceProjection, their ProjectionMembership input, the steward composition behind them and the IA-COMP-PROJECTION-INVALID refusal) were retired on 2026-10-09 by milestone position-packet task replace-renderers (plan amendments B2, B9 and B11). The position packet and its claude and codex adapters replace them in @inventarch/runtime (runtime SPEC R19 and R20), and the CLI and tools/projections render through those. Compliance exports no projection API, no projection marker and no steward host table, and the ids C22–C24 are not reused.
84
80
 
85
81
  ## Trusted evaluator catalog, obligations and evidence (spec-0007 producer)
86
82
 
package/dist/index.d.ts CHANGED
@@ -22,10 +22,6 @@ export { evaluate } from './report.js';
22
22
  export type { Report, ReportOptions } from './report.js';
23
23
  export { runLanguageFixture, fixtureCoverage } from './fixtures.js';
24
24
  export type { FixtureResult, LanguageFixture } from './fixtures.js';
25
- export { renderHostArtifacts, PROJECTION_MARKER, LEGACY_STEWARD_TOOLS, REQUIRE_STEWARD_PROFILES, STEWARD_HOST_TABLE, } from './projections.js';
26
- export type { HostArtifact, HostArtifacts, ProjectionMembership, RenderOptions } from './projections.js';
27
- export { renderWorkspaceProjection, WORKSPACE_PROJECTION_MARKER } from './workspace-projection.js';
28
- export type { WorkspaceProjectionInput } from './workspace-projection.js';
29
25
  export { CLAUDE_MARKETPLACE, CLAUDE_PLUGIN, PLUGIN_MARKER, renderClaudePlugin } from './host-plugin.js';
30
26
  export type { ClaudePluginInput, PluginFile } from './host-plugin.js';
31
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,GAChB,MAAM,cAAc,CAAC;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AM,aAAa,CAAC;AACvC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACpE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxG,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -12,7 +12,5 @@ export { EVALUATION_PROFILES, profileOccurrences } from './profiles.js';
12
12
  export { EVIDENCE_RECEIPT_FORMAT, EVIDENCE_RESULTS, acceptEvaluatorOutput, adaptBuiltinVerdict, admitTransition, evidenceDigest, evidenceKey, validateReceipt, } from './evidence.js';
13
13
  export { evaluate } from './report.js';
14
14
  export { runLanguageFixture, fixtureCoverage } from './fixtures.js';
15
- export { renderHostArtifacts, PROJECTION_MARKER, LEGACY_STEWARD_TOOLS, REQUIRE_STEWARD_PROFILES, STEWARD_HOST_TABLE, } from './projections.js';
16
- export { renderWorkspaceProjection, WORKSPACE_PROJECTION_MARKER } from './workspace-projection.js';
17
15
  export { CLAUDE_MARKETPLACE, CLAUDE_PLUGIN, PLUGIN_MARKER, renderClaudePlugin } from './host-plugin.js';
18
16
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,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ch/language';
2
2
  import type { GraphCode } from '@inventarch/graph';
3
- export declare const COMP_CODES: readonly ["IA-COMP-SCHEMA-MISSING", "IA-COMP-SCHEMA-KIND-MISMATCH", "IA-COMP-SECTION-MISSING", "IA-COMP-SECTION-UNKNOWN", "IA-COMP-FIELD-MISSING", "IA-COMP-FIELD-UNKNOWN", "IA-COMP-FIELD-DUPLICATE", "IA-COMP-FIELD-TYPE", "IA-COMP-FIELD-VALUE", "IA-COMP-FIELD-REF-TARGET", "IA-COMP-FIELD-REF-MISSING", "IA-COMP-FIELD-FORM", "IA-COMP-EDGE-CARDINALITY", "IA-COMP-EDGE-UNRESOLVED", "IA-COMP-SYSTEM-MALFORMED", "IA-COMP-DISCRIMINATOR-FOREIGN", "IA-COMP-BOOTSTRAP-ORDER", "IA-COMP-STEWARD-MISSING", "IA-COMP-CONSENT-EMPTY", "IA-COMP-SCHEMA-UNREFERENCED", "IA-COMP-SCHEMA-MULTIPLE", "IA-COMP-FRAGMENT-MISSING", "IA-COMP-COVERAGE-MISSING", "IA-COMP-COVERAGE-KIND", "IA-COMP-SELECTOR-INVALID", "IA-COMP-CHECK-UNKNOWN", "IA-COMP-CHECK-CONFLICT", "IA-COMP-VARIANT-AMBIGUOUS", "IA-COMP-ADOPTION-FAILED", "IA-COMP-NOT-EVALUATED", "IA-COMP-FIXTURE-MISMATCH", "IA-COMP-PROJECTION-INVALID"];
3
+ export declare const COMP_CODES: readonly ["IA-COMP-SCHEMA-MISSING", "IA-COMP-SCHEMA-KIND-MISMATCH", "IA-COMP-SECTION-MISSING", "IA-COMP-SECTION-UNKNOWN", "IA-COMP-FIELD-MISSING", "IA-COMP-FIELD-UNKNOWN", "IA-COMP-FIELD-DUPLICATE", "IA-COMP-FIELD-TYPE", "IA-COMP-FIELD-VALUE", "IA-COMP-FIELD-REF-TARGET", "IA-COMP-FIELD-REF-MISSING", "IA-COMP-FIELD-FORM", "IA-COMP-EDGE-CARDINALITY", "IA-COMP-EDGE-UNRESOLVED", "IA-COMP-SYSTEM-MALFORMED", "IA-COMP-DISCRIMINATOR-FOREIGN", "IA-COMP-BOOTSTRAP-ORDER", "IA-COMP-STEWARD-MISSING", "IA-COMP-CONSENT-EMPTY", "IA-COMP-SCHEMA-UNREFERENCED", "IA-COMP-SCHEMA-MULTIPLE", "IA-COMP-FRAGMENT-MISSING", "IA-COMP-COVERAGE-MISSING", "IA-COMP-COVERAGE-KIND", "IA-COMP-SELECTOR-INVALID", "IA-COMP-CHECK-UNKNOWN", "IA-COMP-CHECK-CONFLICT", "IA-COMP-VARIANT-AMBIGUOUS", "IA-COMP-ADOPTION-FAILED", "IA-COMP-NOT-EVALUATED", "IA-COMP-FIXTURE-MISMATCH"];
4
4
  export type CompCode = (typeof COMP_CODES)[number];
5
5
  /** Evaluator-catalog, obligation and receipt codes (C25-C29). A separate inventory: the repository
6
6
  * fixture gate (tools/compliance/check.ts) covers COMP_CODES and does not enrol these (open follow-up, SPEC C29). */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAO,MAAM,UAAU,42BAiCb,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AACnD;qHACqH;AACrH,eAAO,MAAM,cAAc,w1BA6BhB,CAAC;AACZ,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,WAAW,OAAQ,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IACvD,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CACzE;AACD,MAAM,WAAW,UAAU;IACz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AAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC;AACD,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AACD,wBAAgB,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOzE;AACD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,EAAE,WAAW,UAAQ,GAAG,UAAU,CAkBlH"}
package/dist/types.js CHANGED
@@ -30,7 +30,6 @@ export const COMP_CODES = [
30
30
  'IA-COMP-ADOPTION-FAILED',
31
31
  'IA-COMP-NOT-EVALUATED',
32
32
  'IA-COMP-FIXTURE-MISMATCH',
33
- 'IA-COMP-PROJECTION-INVALID',
34
33
  ];
35
34
  /** Evaluator-catalog, obligation and receipt codes (C25-C29). A separate inventory: the repository
36
35
  * fixture gate (tools/compliance/check.ts) covers COMP_CODES and does not enrol these (open follow-up, SPEC C29). */
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,wBAAwB;IACxB,8BAA8B;IAC9B,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IACvB,uBAAuB;IACvB,yBAAyB;IACzB,oBAAoB;IACpB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,oBAAoB;IACpB,0BAA0B;IAC1B,yBAAyB;IACzB,0BAA0B;IAC1B,+BAA+B;IAC/B,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IACvB,6BAA6B;IAC7B,yBAAyB;IACzB,0BAA0B;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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC"}
@@ -13,7 +13,6 @@ import {
13
13
  } from '@inventarch/graph';
14
14
  import type { Graph, Node, RevisionSource } from '@inventarch/graph';
15
15
  import {
16
- renderHostArtifacts,
17
16
  validateAdoption,
18
17
  validateCheck,
19
18
  validateCoverage,
@@ -399,7 +398,6 @@ export function runRefusalFixtures(
399
398
  },
400
399
  ],
401
400
  ['IA-COMP-NOT-EVALUATED', () => validateParse(undefined).findings],
402
- ['IA-COMP-PROJECTION-INVALID', () => renderHostArtifacts(records, '').assessment.findings],
403
401
  [
404
402
  'IA-COMP-FIXTURE-MISMATCH',
405
403
  () =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inventarch/compliance",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -49,10 +49,6 @@
49
49
  "types": "./dist/profiles.d.ts",
50
50
  "default": "./dist/profiles.js"
51
51
  },
52
- "./internal/projections": {
53
- "types": "./dist/projections.d.ts",
54
- "default": "./dist/projections.js"
55
- },
56
52
  "./internal/record-text": {
57
53
  "types": "./dist/record-text.d.ts",
58
54
  "default": "./dist/record-text.js"
@@ -73,10 +69,6 @@
73
69
  "types": "./dist/skill-routine.d.ts",
74
70
  "default": "./dist/skill-routine.js"
75
71
  },
76
- "./internal/steward-profile": {
77
- "types": "./dist/steward-profile.d.ts",
78
- "default": "./dist/steward-profile.js"
79
- },
80
72
  "./internal/systems": {
81
73
  "types": "./dist/systems.d.ts",
82
74
  "default": "./dist/systems.js"
@@ -92,10 +84,6 @@
92
84
  "./internal/variants": {
93
85
  "types": "./dist/variants.d.ts",
94
86
  "default": "./dist/variants.js"
95
- },
96
- "./internal/workspace-projection": {
97
- "types": "./dist/workspace-projection.d.ts",
98
- "default": "./dist/workspace-projection.js"
99
87
  }
100
88
  },
101
89
  "files": [
@@ -108,8 +96,8 @@
108
96
  "LANGUAGE.md"
109
97
  ],
110
98
  "dependencies": {
111
- "@inventarch/language": "1.2.0",
112
- "@inventarch/graph": "1.2.0"
99
+ "@inventarch/language": "2.0.0",
100
+ "@inventarch/graph": "2.0.0"
113
101
  },
114
102
  "devDependencies": {
115
103
  "@types/node": "^22.19.0",
@@ -1,51 +0,0 @@
1
- import type { CompiledRecord } from '@inventarch/language';
2
- import type { Assessment } from './types.js';
3
- export { cite, fieldText, governanceClauses, text } from './record-text.js';
4
- export { LEGACY_STEWARD_TOOLS, REQUIRE_STEWARD_PROFILES, STEWARD_HOST_TABLE } from './steward-profile.js';
5
- export declare const PROJECTION_MARKER = "<!-- Generated by tools/projections/generate.ts; edit the cited native records. -->";
6
- export interface HostArtifact {
7
- readonly path: string;
8
- readonly text: string;
9
- }
10
- export interface HostArtifacts {
11
- readonly assessment: Assessment;
12
- readonly artifacts: readonly HostArtifact[];
13
- }
14
- /** Revision-bound physical membership supplied by an admitted-view composition root. */
15
- export interface ProjectionMembership {
16
- readonly revision: string;
17
- readonly members: readonly {
18
- readonly path: string;
19
- readonly system: string | null;
20
- readonly root: string | null;
21
- }[];
22
- }
23
- type Member = ProjectionMembership['members'][number];
24
- /** One admitted non-floor system with its uniquely resolved, correctly rooted steward. */
25
- export interface AdmittedSteward {
26
- readonly system: CompiledRecord;
27
- readonly member: Member;
28
- readonly agent: CompiledRecord;
29
- }
30
- export interface Admission {
31
- readonly byPath: ReadonlyMap<string, Member>;
32
- readonly systems: readonly AdmittedSteward[];
33
- }
34
- export declare const invalidAssessment: (message: string) => HostArtifacts;
35
- /**
36
- * Spec §6.1: the refusal conditions every host renderer shares. Checks, in order: a fresh, matching revision;
37
- * a portable, non-aliased, correctly rooted membership covering every admitted source; unique record identities;
38
- * and, per admitted non-floor system, a single unfragmented steward ref resolving to a uniquely named agent
39
- * declared under that system's own membership root. Callers render artifacts from the returned admission.
40
- */
41
- export declare function admittedStewards(records: readonly CompiledRecord[], revision: string, membership: ProjectionMembership): Admission | HostArtifacts;
42
- export interface RenderOptions {
43
- /** Refuse a steward without an `@agent-profile`. Defaults to REQUIRE_STEWARD_PROFILES. */
44
- readonly requireStewardProfiles?: boolean;
45
- }
46
- /** C22: interpret admitted semantic products; no filesystem or source parser. */
47
- export declare function renderHostArtifacts(records: readonly CompiledRecord[], revision: string, membership?: ProjectionMembership, _modes?: readonly {
48
- readonly invocation: string;
49
- readonly meaning: string;
50
- }[], _options?: RenderOptions): HostArtifacts;
51
- //# sourceMappingURL=projections.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projections.d.ts","sourceRoot":"","sources":["../src/projections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1G,eAAO,MAAM,iBAAiB,wFAAwF,CAAC;AACvH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;CAC7C;AACD,wFAAwF;AACxF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAC;CACtH;AACD,KAAK,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AACtD,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;CAChC;AACD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,KAAG,aAMhD,CAAC;AACL;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,oBAAoB,GAC/B,SAAS,GAAG,aAAa,CA2E3B;AACD,MAAM,WAAW,aAAa;IAC5B,0FAA0F;IAC1F,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAC3C;AACD,iFAAiF;AACjF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,oBAAoB,EACjC,MAAM,CAAC,EAAE,SAAS;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,EAC7E,QAAQ,GAAE,aAAkB,GAC3B,aAAa,CAyCf"}
@@ -1,124 +0,0 @@
1
- import { assess } from './types.js';
2
- import { cite, text } from './record-text.js';
3
- export { cite, fieldText, governanceClauses, text } from './record-text.js';
4
- export { LEGACY_STEWARD_TOOLS, REQUIRE_STEWARD_PROFILES, STEWARD_HOST_TABLE } from './steward-profile.js';
5
- export const PROJECTION_MARKER = '<!-- Generated by tools/projections/generate.ts; edit the cited native records. -->';
6
- const word = /^[a-z][a-z0-9-]*$/;
7
- export const invalidAssessment = (message) => Object.freeze({
8
- assessment: assess('COMP-PROJECTIONS', 'repository', [
9
- { code: 'IA-COMP-PROJECTION-INVALID', severity: 'error', path: '.ia/src/systems', line: 1, message },
10
- ]),
11
- artifacts: Object.freeze([]),
12
- });
13
- /**
14
- * Spec §6.1: the refusal conditions every host renderer shares. Checks, in order: a fresh, matching revision;
15
- * a portable, non-aliased, correctly rooted membership covering every admitted source; unique record identities;
16
- * and, per admitted non-floor system, a single unfragmented steward ref resolving to a uniquely named agent
17
- * declared under that system's own membership root. Callers render artifacts from the returned admission.
18
- */
19
- export function admittedStewards(records, revision, membership) {
20
- if (!revision.trim() || membership.revision !== revision)
21
- return invalidAssessment('Projection membership revision is stale');
22
- const sources = new Set(records.map((r) => r.source.path)), byPath = new Map(), aliases = new Set();
23
- const portable = (path) => path === path.normalize('NFC') &&
24
- !/[\\\u0000-\u001f<>:"|?*]/.test(path) &&
25
- path
26
- .split('/')
27
- .every((part) => !!part &&
28
- part !== '.' &&
29
- part !== '..' &&
30
- !/[. ]$/.test(part) &&
31
- !/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(?:\.|$)/i.test(part));
32
- for (const member of membership.members) {
33
- const key = member.path.toLowerCase();
34
- if (!sources.has(member.path) || aliases.has(key) || !portable(member.path))
35
- return invalidAssessment('Invalid or conflicting projection membership');
36
- if (member.system === null
37
- ? member.root !== null
38
- : !word.test(member.system) ||
39
- member.root === null ||
40
- !portable(member.root) ||
41
- !member.root.endsWith('/' + member.system) ||
42
- !member.path.startsWith(member.root + '/'))
43
- return invalidAssessment('Invalid or conflicting projection membership');
44
- aliases.add(key);
45
- byPath.set(member.path, member);
46
- }
47
- if (records.some((r) => !byPath.has(r.source.path)))
48
- return invalidAssessment('Projection source membership is unavailable');
49
- const occurrences = new Set();
50
- for (const record of records) {
51
- if (occurrences.has(record.identity))
52
- return invalidAssessment('Projection requires unique admitted record identities');
53
- occurrences.add(record.identity);
54
- }
55
- const systemRecords = records
56
- .filter((r) => r.discriminator === 'system' && !r.source.path.startsWith('.ia/src/floor/'))
57
- .sort((a, b) => (a.name < b.name ? -1 : 1));
58
- if (systemRecords.length === 0)
59
- return invalidAssessment('No admitted native systems');
60
- const names = new Set(), systems = [];
61
- for (const system of systemRecords) {
62
- const member = byPath.get(system.source.path);
63
- const refs = system.head.filter((f) => f.key === 'steward').map((f) => f.value), ref = refs.length === 1 ? refs[0] : undefined;
64
- const found = ref?.kind === 'ref' && ref.discriminator === 'agent' && ref.fragment === undefined
65
- ? records.filter((r) => r.discriminator === 'agent' && r.name === ref.name && byPath.get(r.source.path)?.system === system.name)
66
- : [];
67
- const agent = found.length === 1 ? found[0] : undefined;
68
- if (!word.test(system.name) ||
69
- member?.system !== system.name ||
70
- system.source.path !== member.root + '/system.ia' ||
71
- agent === undefined ||
72
- !word.test(agent.name) ||
73
- names.has(agent.name))
74
- return invalidAssessment(`Invalid or nonunique host steward for ${system.name}`);
75
- names.add(agent.name);
76
- systems.push({ system, member, agent });
77
- }
78
- return { byPath, systems };
79
- }
80
- /** C22: interpret admitted semantic products; no filesystem or source parser. */
81
- export function renderHostArtifacts(records, revision, membership, _modes, _options = {}) {
82
- if (!revision.trim())
83
- return invalidAssessment('Projection requires a corpus revision');
84
- // Legacy callers retain their authored-only contract. Adopted callers supply the
85
- // database's observations; this package neither discovers mounts nor imports db.
86
- const resolved = membership ?? {
87
- revision,
88
- members: [...new Set(records.map((r) => r.source.path))].flatMap((path) => {
89
- const match = /^(\.ia\/src\/systems\/([a-z][a-z0-9-]*))\//.exec(path);
90
- return [{ path, system: match?.[2] ?? null, root: match?.[1] ?? null }];
91
- }),
92
- };
93
- const admitted = admittedStewards(records, revision, resolved);
94
- if ('artifacts' in admitted)
95
- return admitted;
96
- const { systems } = admitted;
97
- const artifacts = [], rows = [];
98
- for (const { system, agent } of systems) {
99
- const meaning = agent.sections
100
- .filter((section) => section.name === 'meaning')
101
- .flatMap((section) => section.fields)
102
- .filter((field) => 'key' in field && field.key === 'says')
103
- .map((field) => ('value' in field ? text(field.value) : ''))
104
- .join('\n');
105
- const attribution = `${PROJECTION_MARKER}\n\nSource revision: ${revision}\n\nSources: ${cite(system)}; ${cite(agent)}.`;
106
- artifacts.push({
107
- path: `.claude/agents/${agent.name}.md`,
108
- text: `---\nname: ${agent.name}\ndescription: ${JSON.stringify('Language reference for ' + system.name)}\n---\n\n${attribution}\n\n${meaning}\n\nRead docs/reference/language/vocabulary.json for canonical words and schemas. Validate required fields and references. An admitted declaration does not prove execution or grant authority. Adopted source paths are immutable references.\n`,
109
- });
110
- rows.push(`- ${system.name}: ${cite(system)}; ${cite(agent)}.`);
111
- }
112
- artifacts.push({
113
- path: 'CLAUDE.md',
114
- text: `${PROJECTION_MARKER}\n\n# IA language\n\nSource revision: ${revision}\n\nRead docs/reference/language/README.md and vocabulary.json for language contracts.\n\n${rows.join('\n')}\n`,
115
- });
116
- const skill = `---\nname: ia-authoring\ndescription: Author records against the public IA language contracts.\n---\n\n${PROJECTION_MARKER}\n\nRead docs/reference/language/README.md and vocabulary.json. Select the word matching the intended representation, satisfy its canonical schema, and validate references. Execution requires a separately supplied evaluator or host.\n`;
117
- for (const host of ['.agents', '.claude'])
118
- artifacts.push({ path: `${host}/skills/ia-authoring/SKILL.md`, text: skill });
119
- return Object.freeze({
120
- assessment: assess('COMP-PROJECTIONS', 'repository', []),
121
- artifacts: Object.freeze(artifacts.map((artifact) => Object.freeze(artifact))),
122
- });
123
- }
124
- //# sourceMappingURL=projections.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projections.js","sourceRoot":"","sources":["../src/projections.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAA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,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;QACvC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,+BAA+B,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC,kBAAkB,EAAE,YAAY,EAAE,EAAE,CAAC;QACxD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;KAC/E,CAAC,CAAC;AACL,CAAC"}
@@ -1,39 +0,0 @@
1
- import type { CompiledRecord } from '@inventarch/language';
2
- /**
3
- * The installed steward host table (tools/projections/SPEC.md, "Steward composition"). A steward's
4
- * `@agent-profile` must declare `execution.role` equal to the steward's agent name (compared with the agent record, so
5
- * the table holds no role value), these `outcomes` and `mandate-contract` ids, and a mandate whose
6
- * `execution.contract`, when present, equals `mandateContract`.
7
- * `tools` maps each admitted capability effect to the host tools it grants; any other effect is refused.
8
- */
9
- export declare const STEWARD_HOST_TABLE: Readonly<{
10
- outcomes: "steward-outcomes-v1";
11
- mandateContract: "steward-authoring-v1";
12
- tools: Readonly<Record<string, readonly string[]>>;
13
- }>;
14
- /** Tool order in rendered frontmatter; also the full set a steward without a profile receives during the transition. */
15
- export declare const LEGACY_STEWARD_TOOLS: readonly string[];
16
- /**
17
- * Transition switch (docs/plans/framework-records-baseline/README.md §0.1; tools/projections/SPEC.md P10).
18
- * Every steward now has a profile, so a steward without one is refused by default. A caller that passes
19
- * `requireStewardProfiles: false` still renders such a steward from its agent record alone with LEGACY_STEWARD_TOOLS.
20
- */
21
- export declare const REQUIRE_STEWARD_PROFILES = true;
22
- export type StewardComposition = {
23
- readonly kind: 'legacy';
24
- } | {
25
- readonly kind: 'refused';
26
- readonly message: string;
27
- } | {
28
- readonly kind: 'profile';
29
- readonly sources: readonly CompiledRecord[];
30
- readonly playbooks: readonly CompiledRecord[];
31
- readonly tools: readonly string[];
32
- readonly text: string;
33
- };
34
- /**
35
- * Compose one steward from the `@agent-profile` whose `composition.agent` names it. Reads compiled records
36
- * generically by discriminator and field names; it does not import the composition system's code.
37
- */
38
- export declare function composeSteward(records: readonly CompiledRecord[], agent: CompiledRecord, requireProfiles: boolean): StewardComposition;
39
- //# sourceMappingURL=steward-profile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steward-profile.d.ts","sourceRoot":"","sources":["../src/steward-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,sBAAsB,CAAC;AAG1E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;WAMvB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;EACjD,CAAC;AACH,wHAAwH;AACxH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAAqE,CAAC;AACxH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AA+DN;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,KAAK,EAAE,cAAc,EACrB,eAAe,EAAE,OAAO,GACvB,kBAAkB,CAOpB"}
@@ -1,178 +0,0 @@
1
- import { cite, fieldOf, fieldsOf, fieldText, governanceClauses, says, text } from './record-text.js';
2
- /**
3
- * The installed steward host table (tools/projections/SPEC.md, "Steward composition"). A steward's
4
- * `@agent-profile` must declare `execution.role` equal to the steward's agent name (compared with the agent record, so
5
- * the table holds no role value), these `outcomes` and `mandate-contract` ids, and a mandate whose
6
- * `execution.contract`, when present, equals `mandateContract`.
7
- * `tools` maps each admitted capability effect to the host tools it grants; any other effect is refused.
8
- */
9
- export const STEWARD_HOST_TABLE = Object.freeze({
10
- outcomes: 'steward-outcomes-v1',
11
- mandateContract: 'steward-authoring-v1',
12
- tools: Object.freeze({
13
- read: Object.freeze(['Read', 'Glob', 'Grep']),
14
- 'local-write': Object.freeze(['Write', 'Edit', 'Bash']),
15
- }),
16
- });
17
- /** Tool order in rendered frontmatter; also the full set a steward without a profile receives during the transition. */
18
- export const LEGACY_STEWARD_TOOLS = Object.freeze(['Read', 'Write', 'Edit', 'Glob', 'Grep', 'Bash']);
19
- /**
20
- * Transition switch (docs/plans/framework-records-baseline/README.md §0.1; tools/projections/SPEC.md P10).
21
- * Every steward now has a profile, so a steward without one is refused by default. A caller that passes
22
- * `requireStewardProfiles: false` still renders such a steward from its agent record alone with LEGACY_STEWARD_TOOLS.
23
- */
24
- export const REQUIRE_STEWARD_PROFILES = true;
25
- class Refusal extends Error {
26
- }
27
- const fail = (message) => {
28
- throw new Refusal(message);
29
- };
30
- /** Resolve one typed reference to exactly one compiled record of the expected discriminator, or refuse. */
31
- function resolve(records, value, discriminator, where) {
32
- if (value?.kind !== 'ref' || value.discriminator !== discriminator || value.fragment !== undefined)
33
- return fail(`${where}: expected one @${discriminator} reference`);
34
- const found = records.filter((r) => r.discriminator === discriminator && r.name === value.name);
35
- return found.length === 1
36
- ? found[0]
37
- : fail(`${where}: @${discriminator} ${value.name} resolves to ${found.length} records`);
38
- }
39
- function refs(value) {
40
- return value === undefined ? [] : value.kind === 'list' ? value.items : [value];
41
- }
42
- const scalar = (record, section, key) => {
43
- const field = fieldOf(record, section, key);
44
- return field === undefined ? undefined : text(field.value);
45
- };
46
- const entries = (list) => list.map((r) => `- ${r.name}: ${says(r)} (${r.source.path}:${r.source.line})`).join('\n');
47
- const mandateLimits = [
48
- 'limit-steps',
49
- 'limit-model-calls',
50
- 'limit-operations',
51
- 'limit-tokens',
52
- 'limit-children',
53
- 'limit-depth',
54
- 'limit-bytes',
55
- 'limit-duration-ms',
56
- ];
57
- /** This prose host supports a closed subset; admitted executable fields must never disappear silently. */
58
- function executionSubset(record, allowed) {
59
- const seen = new Set();
60
- for (const field of record.sections
61
- .filter((section) => section.name === 'execution')
62
- .flatMap((section) => section.fields)) {
63
- if (!('key' in field))
64
- return fail(`${record.discriminator} ${record.name}: unsupported execution item`);
65
- if (!allowed.includes(field.key) || seen.has(field.key) || field.when || field.fields)
66
- fail(`${record.discriminator} ${record.name}: unsupported, duplicate or conditional execution.${field.key}`);
67
- seen.add(field.key);
68
- if (field.key.startsWith('limit-')) {
69
- const value = Number(text(field.value));
70
- if (!['scalar', 'string', 'prose'].includes(field.value.kind) ||
71
- !text(field.value).trim() ||
72
- !Number.isSafeInteger(value) ||
73
- value < 0 ||
74
- (field.key === 'limit-duration-ms' && value === 0))
75
- fail(`Mandate ${record.name}: invalid execution.${field.key}`);
76
- }
77
- }
78
- }
79
- /**
80
- * Compose one steward from the `@agent-profile` whose `composition.agent` names it. Reads compiled records
81
- * generically by discriminator and field names; it does not import the composition system's code.
82
- */
83
- export function composeSteward(records, agent, requireProfiles) {
84
- try {
85
- return compose(records, agent, requireProfiles);
86
- }
87
- catch (error) {
88
- if (error instanceof Refusal)
89
- return { kind: 'refused', message: error.message };
90
- throw error;
91
- }
92
- }
93
- function compose(records, agent, requireProfiles) {
94
- const profiles = records.filter((r) => {
95
- const target = fieldOf(r, 'composition', 'agent')?.value;
96
- return (r.discriminator === 'agent-profile' &&
97
- target?.kind === 'ref' &&
98
- target.discriminator === 'agent' &&
99
- target.name === agent.name &&
100
- target.fragment === undefined);
101
- });
102
- if (profiles.length === 0)
103
- return requireProfiles ? fail(`Steward ${agent.name} has no @agent-profile`) : { kind: 'legacy' };
104
- if (profiles.length > 1)
105
- fail(`Steward ${agent.name} has ${profiles.length} @agent-profile records; expected one`);
106
- const profile = profiles[0], where = `Steward profile ${profile.name}`;
107
- executionSubset(profile, ['role', 'outcomes', 'mandate-contract']);
108
- const role = scalar(profile, 'execution', 'role'), outcomes = scalar(profile, 'execution', 'outcomes'), contract = scalar(profile, 'execution', 'mandate-contract');
109
- if (role !== agent.name)
110
- fail(`${where}: execution.role ${role ?? '(missing)'} must equal the steward name ${agent.name}`);
111
- if (outcomes !== STEWARD_HOST_TABLE.outcomes)
112
- fail(`${where}: execution.outcomes ${outcomes ?? '(missing)'} is not the installed steward outcomes ${STEWARD_HOST_TABLE.outcomes}`);
113
- if (contract !== STEWARD_HOST_TABLE.mandateContract)
114
- fail(`${where}: execution.mandate-contract ${contract ?? '(missing)'} is not the installed steward mandate contract ${STEWARD_HOST_TABLE.mandateContract}`);
115
- if (refs(fieldOf(profile, 'composition', 'delegates')?.value).length > 0)
116
- fail(`${where}: composition.delegates is not supported for a steward`);
117
- const mandate = resolve(records, fieldOf(profile, 'composition', 'mandate')?.value, 'mandate', `${where}: composition.mandate`);
118
- executionSubset(mandate, ['contract', ...mandateLimits]);
119
- const mandateContract = scalar(mandate, 'execution', 'contract');
120
- if (mandateContract !== undefined && mandateContract !== STEWARD_HOST_TABLE.mandateContract)
121
- fail(`Mandate ${mandate.name}: execution.contract ${mandateContract} does not match the steward mandate contract ${STEWARD_HOST_TABLE.mandateContract}`);
122
- const bounds = governanceClauses(mandate, ['requires']);
123
- if (!bounds.ok)
124
- return fail(`Mandate ${mandate.name}: empty ${bounds.key} clause`);
125
- if (!bounds.text)
126
- fail(`Mandate ${mandate.name} states no governance.requires`);
127
- const limits = fieldsOf(mandate, 'execution')
128
- .filter((f) => f.key.startsWith('limit-'))
129
- .map((f) => `${f.key} ${text(f.value)}`);
130
- const voiceValue = fieldOf(profile, 'composition', 'voice')?.value;
131
- const voice = voiceValue === undefined ? undefined : resolve(records, voiceValue, 'voice', `${where}: composition.voice`);
132
- const capabilityRefs = refs(fieldOf(profile, 'composition', 'capabilities')?.value);
133
- if (capabilityRefs.length === 0)
134
- fail(`${where}: composition.capabilities is empty`);
135
- const effects = new Set(), playbooks = [], sources = [profile, mandate, ...(voice ? [voice] : [])], capabilityText = [];
136
- for (const value of capabilityRefs) {
137
- const capability = resolve(records, value, 'capability', `${where}: composition.capabilities`);
138
- executionSubset(capability, ['effects']);
139
- if (refs(fieldOf(capability, 'composition', 'includes')?.value).length > 0)
140
- fail(`Capability ${capability.name}: composition.includes is not expanded for a steward`);
141
- const listed = (key, discriminator) => refs(fieldOf(capability, 'composition', key)?.value).map((item) => resolve(records, item, discriminator, `Capability ${capability.name}: composition.${key}`));
142
- const operations = listed('operations', 'operation'), checks = listed('checks', 'check');
143
- playbooks.push(...listed('playbooks', 'playbook'));
144
- sources.push(capability);
145
- const declared = refs(fieldOf(capability, 'execution', 'effects')?.value).map(text);
146
- if (declared.length === 0)
147
- fail(`Capability ${capability.name}: execution.effects is empty`);
148
- for (const effect of declared) {
149
- if (!Object.hasOwn(STEWARD_HOST_TABLE.tools, effect))
150
- fail(`Capability ${capability.name}: effect ${effect} has no steward host tool mapping`);
151
- effects.add(effect);
152
- }
153
- capabilityText.push([
154
- `### ${capability.name}`,
155
- `Source: ${cite(capability)}`,
156
- says(capability),
157
- ...(operations.length ? [`Operations:\n\n${entries(operations)}`] : []),
158
- ...(checks.length ? [`Checks:\n\n${entries(checks)}`] : []),
159
- `Effects: ${declared.join(', ')}`,
160
- ].join('\n\n'));
161
- }
162
- const granted = new Set([...effects].flatMap((effect) => STEWARD_HOST_TABLE.tools[effect]));
163
- const tools = LEGACY_STEWARD_TOOLS.filter((tool) => granted.has(tool));
164
- const voiceText = voice === undefined
165
- ? []
166
- : [
167
- `## Voice\n\nSource: ${cite(voice)}\n\n${says(voice)}\n\n${fieldsOf(voice, 'communication')
168
- .map((f) => `- ${f.key}: ${fieldText(f)}`)
169
- .join('\n')}`,
170
- ];
171
- const body = [
172
- `## Mandate\n\nSource: ${cite(mandate)}\n\n${says(mandate)}\n\n${bounds.text}${limits.length ? `\n\nAdvisory limits (this prose projection does not enforce runtime ceilings): ${limits.join('; ')}.` : ''}`,
173
- ...voiceText,
174
- `## Capabilities\n\nSource: ${cite(profile)}\n\n${capabilityText.join('\n\n')}`,
175
- ].join('\n\n');
176
- return { kind: 'profile', sources, playbooks, tools, text: body };
177
- }
178
- //# sourceMappingURL=steward-profile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steward-profile.js","sourceRoot":"","sources":["../src/steward-profile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAErG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,QAAQ,EAAE,qBAAqB;IAC/B,eAAe,EAAE,sBAAsB;IACvC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7C,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;KACxD,CAAgD;CAClD,CAAC,CAAC;AACH,wHAAwH;AACxH,MAAM,CAAC,MAAM,oBAAoB,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CA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G;QACX,yBAAyB,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,kFAAkF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC5M,GAAG,SAAS;QACZ,8BAA8B,IAAI,CAAC,OAAO,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;KAChF,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACf,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACpE,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { CompiledRecord } from '@inventarch/language';
2
- import type { HostArtifacts, ProjectionMembership } from './projections.js';
3
- export declare const WORKSPACE_PROJECTION_MARKER = "<!-- Generated by ia host; edit the cited native records. -->";
4
- export interface WorkspaceProjectionInput {
5
- readonly host: 'claude' | 'codex';
6
- /** HOST_MODES rows from @inventarch/distribution/host-modes, rendered with the literal `<cache>` placeholder. */
7
- readonly modes: readonly {
8
- readonly invocation: string;
9
- readonly meaning: string;
10
- }[];
11
- readonly distributions: readonly {
12
- readonly id: string;
13
- readonly version: string;
14
- }[];
15
- readonly operations: readonly string[];
16
- }
17
- /**
18
- * Spec §6.1: systems, stewards, distributions, door, launcher modes. No named procedure is required.
19
- * Shares every refusal condition with renderHostArtifacts through admittedStewards (projections.ts).
20
- */
21
- export declare function renderWorkspaceProjection(records: readonly CompiledRecord[], revision: string, membership: ProjectionMembership, input: WorkspaceProjectionInput): HostArtifacts;
22
- //# sourceMappingURL=workspace-projection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-projection.d.ts","sourceRoot":"","sources":["../src/workspace-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,KAAK,EAAgB,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE1F,eAAO,MAAM,2BAA2B,kEAAkE,CAAC;AAC3G,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,iHAAiH;IACjH,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrF,QAAQ,CAAC,aAAa,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AACD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,oBAAoB,EAChC,KAAK,EAAE,wBAAwB,GAC9B,aAAa,CA2Df"}
@@ -1,68 +0,0 @@
1
- import { assess } from './types.js';
2
- import { admittedStewards, cite, governanceClauses, invalidAssessment } from './projections.js';
3
- import { says } from './record-text.js';
4
- export const WORKSPACE_PROJECTION_MARKER = '<!-- Generated by ia host; edit the cited native records. -->';
5
- /**
6
- * Spec §6.1: systems, stewards, distributions, door, launcher modes. No named procedure is required.
7
- * Shares every refusal condition with renderHostArtifacts through admittedStewards (projections.ts).
8
- */
9
- export function renderWorkspaceProjection(records, revision, membership, input) {
10
- const admitted = admittedStewards(records, revision, membership);
11
- if ('artifacts' in admitted)
12
- return admitted;
13
- const rows = [], agents = [];
14
- for (const { system, member, agent } of admitted.systems) {
15
- rows.push(`- ${system.name}: steward ${agent.name}; ${cite(system)}; ${cite(agent)}.`);
16
- // Host plugin distribution spec §10 (amends M5.3 §6.2): a steward follows its system into the workspace, authored
17
- // or installed; admittedStewards already excludes the floor, so every file here has records to ground on.
18
- if (input.host === 'claude') {
19
- // A list-form (block) clause renders as bullets; an empty clause is refused, as in renderHostArtifacts.
20
- const rendered = governanceClauses(agent, ['applies', 'requires']);
21
- if (!rendered.ok)
22
- return invalidAssessment(`Steward ${agent.name}: empty ${rendered.key} clause`);
23
- const clauses = rendered.text;
24
- // C24, as projections.ts marks adopted sources: a steward whose system is installed or adopted cannot repair its
25
- // definitions (the steward guard refuses those paths), so it reviews them and authors only local contributions.
26
- const local = member.root === `.ia/src/systems/${system.name}`;
27
- const description = local
28
- ? `Use for authoring, reviewing or repairing records owned by ${system.name}.`
29
- : `Use for reviewing records owned by ${system.name} and for authoring its permitted local contributions.`;
30
- const immutable = local
31
- ? ''
32
- : '\nInstalled or adopted definition sources are immutable. Author permitted project contributions in the local system folder; do not edit the cited source paths.\n';
33
- agents.push({
34
- path: `.claude/agents/${agent.name}.md`,
35
- text: `---\nname: ${agent.name}\ndescription: ${JSON.stringify(description)}\n---\n\n${WORKSPACE_PROJECTION_MARKER}\n\nSource revision: ${revision}\n\nSources: ${cite(system)}; ${cite(agent)}.\n\n# ${agent.name}\n\n${says(agent)}\n${clauses ? '\n' + clauses + '\n' : ''}${immutable}`,
36
- });
37
- }
38
- }
39
- const distributions = input.distributions.length
40
- ? input.distributions
41
- .slice()
42
- .sort((a, b) => (a.id < b.id ? -1 : 1))
43
- .map((d) => `- ${d.id} ${d.version}`)
44
- .join('\n')
45
- : '- none';
46
- const modes = input.modes.map((m) => `- \`${m.invocation}\`: ${m.meaning}`).join('\n');
47
- // Operator decision 2026-09-23: Claude is the host that registers the steward guard; the sentence states its rule, not that it ran.
48
- const guard = input.host === 'claude'
49
- ? `\n\nWhen the steward guard is registered, edits under .ia/src/systems/<name>/ are accepted only from that system's steward subagent.`
50
- : '';
51
- const instructions = `${WORKSPACE_PROJECTION_MARKER}\n\n# IA workspace\n\nSource revision: ${revision}\n\n## Systems and stewards\n\n${rows.join('\n')}${guard}\n\n## Installed distributions\n\n${distributions}\n\n## Reaching the door\n\nThe MCP server \`ia-workspace\` serves this workspace read-only. For one-shot queries run \`ia <operation> --root <workspace>\`, where the operation is one of: ${input.operations.join(', ')}.\n\n## Launcher modes\n\n\`ia doctor\` reports the path of \`<cache>\`.\n\n${modes}\n\n\n## User-level state\n\n~/.ia is the user-level IA home, not a workspace; ia doctor reports it.\n\nThis file is a projection of records. Adding text to it creates no rule; rules are authored records.\n`;
52
- const skill = `---\nname: ia-authoring\ndescription: Author or review IA records in this workspace.\n---\n\n${WORKSPACE_PROJECTION_MARKER}\n\nSource revision: ${revision}\n\nFind a word and its schema with \`ia vocabulary <word> --schema\`. Check records with \`ia validate\`. Inspect an admitted record with \`ia inspect <identity>\`. Validation establishes conformance to the declared schemas, not design quality.\n`;
53
- const artifacts = input.host === 'claude'
54
- ? [
55
- { path: '.claude/rules/ia-workspace.md', text: instructions },
56
- { path: '.claude/skills/ia-authoring/SKILL.md', text: skill },
57
- ...agents,
58
- ]
59
- : [
60
- { path: 'AGENTS.md', text: instructions },
61
- { path: '.agents/skills/ia-authoring/SKILL.md', text: skill },
62
- ];
63
- return Object.freeze({
64
- assessment: assess('COMP-PROJECTIONS', 'repository', []),
65
- artifacts: Object.freeze(artifacts.map((a) => Object.freeze(a))),
66
- });
67
- }
68
- //# sourceMappingURL=workspace-projection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workspace-projection.js","sourceRoot":"","sources":["../src/workspace-projection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,MAAM,CAAC,MAAM,2BAA2B,GAAG,+DAA+D,CAAC;A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