archgraph-argo-beta 0.27.0-beta.0 → 0.27.0-beta.1

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/argo/.env.example CHANGED
@@ -142,7 +142,7 @@ ARGO_W31_LIVE_MUTATION_VECTOR_E2E=
142
142
  # Pin the workspace/repository root the MCP server serves.
143
143
  # ARGO_REPO_ROOT=
144
144
  # Explicit schema-bundle directory (highest precedence): overrides both the
145
- # repository's own <workspace>/.argo/schema bundle and the default ArgoBument
145
+ # repository's own <workspace>/.argo/schema bundle and the default ArchiMate 3.2
146
146
  # bundle. Must contain SystemArchitecture.schema.json.
147
147
  # ARGO_SCHEMA_DIR=
148
148
  # Actor element type the wakeup gate looks up when a workspace schema renames
@@ -30,7 +30,7 @@ Non-negotiable red lines (MUST). Never skip, simplify, or silently violate them;
30
30
 
31
31
  <Ontology>
32
32
  Resolve the workspace modeling language before acting; do not assume ArchiMate. `queryNeo4jGraph` with `{schema:true}` returns `schemaKind`, `schemaLanguage`, the element/relationship type enums, `actorElementType`, `bundleValidation` and `guidePath`.
33
- 1. `schemaKind` `default`: the built-in ArgoBument language (ArchiMate 3.2 + ARGO). Reference files under ~/.argo: structure `~/.argo/schema/SystemArchitecture.schema.json`; types `~/.argo/schema/archimate3.2.md`.
33
+ 1. `schemaKind` `default`: the built-in ArchiMate 3.2 modeling language (with ARGO extensions). Reference files under ~/.argo: structure `~/.argo/schema/SystemArchitecture.schema.json`; types `~/.argo/schema/archimate3.2.md`.
34
34
  2. `schemaKind` `workspace`/`override`: the repository's own schema bundle. Its element/relationship types, endpoint rules, root-view name, per-view element limit and guide govern every read and write — never assume ArchiMate types here.
35
35
  3. `actorElementType` is the element type whose members are Actors (default `Business Actor`; `null` = no actor concept → skip Actor identification). Host override: ARGO_ACTOR_ELEMENT_TYPE.
36
36
  4. If `bundleValidation.status` is `failed`, the workspace schema is misconfigured: report it to the human partner and do not write until it is fixed.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "ArgoBument default schema bundle descriptor",
4
- "description": "Descriptor for the default ARGO schema bundle (ArchiMate 3.2 + ARGO extensions). A repository may override this bundle by placing its own SystemArchitecture.schema.json (plus an optional argob.config.json / argob-rules.json) under <workspace>/.argo/schema.",
3
+ "title": "ArchiMate 3.2 default schema bundle descriptor",
4
+ "description": "Descriptor for the default ARGO schema bundle (ArchiMate 3.2 + ARGO extensions). A repository may override this bundle by placing its own SystemArchitecture.schema.json (plus an optional schema-bundle.config.json / schema-bundle.rules.json) under <workspace>/.argo/schema.",
5
5
  "language": "ArchiMate 3.2",
6
6
  "elementTypeEnumKey": "archimateElementType",
7
7
  "relationshipTypeEnumKey": "archimateRelationshipType",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "dialect": "archimate-class-matrix",
3
- "description": "Default ArgoBument rule data extracted from argo/scripts/archimate32-rules.js. Makes the default schema bundle data-driven so it can be replaced file-for-file like any custom bundle.",
3
+ "description": "Default ArchiMate 3.2 rule data extracted from argo/scripts/archimate32-rules.js. Makes the default schema bundle data-driven so it can be replaced file-for-file like any custom bundle.",
4
4
  "elementTypeMetadata": {
5
5
  "Resource": {
6
6
  "layer": "Strategy",
@@ -14,7 +14,7 @@ const {
14
14
  } = require('./repositoryArgoEnvironment.js');
15
15
  const {
16
16
  loadSchemaBundleAndOntology,
17
- } = require('./argob-schema.js');
17
+ } = require('./schema-bundle.js');
18
18
  const {
19
19
  externalQueryRequested,
20
20
  queryExternalRead,
@@ -438,7 +438,7 @@ async function callTool(name, args = {}, progressToken = null, dependencies = un
438
438
  return toolResult({
439
439
  status: report.status,
440
440
  workspaceRoot: workspace.workspaceRoot,
441
- // The resolved modeling language for this workspace (default ArgoBument vs
441
+ // The resolved modeling language for this workspace (default ArchiMate 3.2 vs
442
442
  // the repository's own .argo/schema bundle) so init names the active schema.
443
443
  schema: workspace.schema,
444
444
  schemaBundle: report.schemaBundle,
@@ -535,7 +535,7 @@ async function initializeWorkspace(workspaceRoot) {
535
535
  const graphTargetPath = path.join(workspaceRoot, ...WORKSPACE_GRAPH_PATH_SEGMENTS);
536
536
  const graphRelativePath = normalizeRelativePath(path.relative(workspaceRoot, graphTargetPath));
537
537
  if (!fs.existsSync(graphTargetPath)) {
538
- // Only the built-in ArgoBument default schema auto-provides a graph (the
538
+ // Only the built-in ArchiMate 3.2 default schema auto-provides a graph (the
539
539
  // packaged default). For any custom / replaced schema the graph is the user's
540
540
  // own: never copy the packaged (mismatched) graph — fail closed if missing.
541
541
  let ontology = null;
@@ -590,7 +590,7 @@ async function initializeWorkspace(workspaceRoot) {
590
590
  } catch (error) {
591
591
  qeaFullProjection = { status: 'failed', error: String(error && error.message ? error.message : error) };
592
592
  }
593
- // Report which schema this workspace resolves to (default ArgoBument vs a
593
+ // Report which schema this workspace resolves to (default ArchiMate 3.2 vs a
594
594
  // repository's own .argo/schema bundle) so the caller/human can see the active
595
595
  // modeling language right after init.
596
596
  let schema;
@@ -57,7 +57,7 @@ async function runHarnessReport({ checkOnly, workspaceRoot, includeBootstrap })
57
57
  try {
58
58
  report.harnessEnvironment = loadRepositoryArgoEnvironment(workspaceRoot);
59
59
  try {
60
- const { bundle, ontology } = require('./argob-schema.js').loadSchemaBundleAndOntology(workspaceRoot);
60
+ const { bundle, ontology } = require('./schema-bundle.js').loadSchemaBundleAndOntology(workspaceRoot);
61
61
  report.schemaBundle = {
62
62
  kind: bundle.kind,
63
63
  language: ontology.language,
@@ -8,10 +8,10 @@
8
8
  // view element limit) is supplied by an *ontology* so a repository that ships
9
9
  // its own schema under .argo/schema is validated against its own language.
10
10
  //
11
- // The ontology argument is optional: when omitted, the default ArgoBument
11
+ // The ontology argument is optional: when omitted, the default ArchiMate 3.2
12
12
  // (ArchiMate 3.2 + ARGO) ontology is used, preserving historical behaviour.
13
13
 
14
- const { loadSchemaBundleAndOntology } = require('./argob-schema.js');
14
+ const { loadSchemaBundleAndOntology } = require('./schema-bundle.js');
15
15
 
16
16
  let defaultOntology = null;
17
17
 
@@ -30,7 +30,7 @@ function resolveOntology(ontology) {
30
30
  *
31
31
  * @param {object} document - parsed SystemArchitecture JSON
32
32
  * @param {string[]} errors - error accumulator
33
- * @param {object} [ontology] - resolved modeling language (defaults to ArgoBument)
33
+ * @param {object} [ontology] - resolved modeling language (defaults to ArchiMate 3.2)
34
34
  */
35
35
  function validateGraphSemantics(document, errors, ontology) {
36
36
  if (!document || typeof document !== 'object') {
@@ -423,13 +423,13 @@ async function writeArchitectureGraph(graphPath, graph) {
423
423
  * Dependency direction for delivery:
424
424
  * For element X, its upstream dependencies = elements X needs to be delivered first.
425
425
  * The mapping comes from the ACTIVE schema bundle's `deliveryDependencies`
426
- * (argob.config.json), not hardcoded ArchiMate names, so a custom schema can
427
- * declare its own relationship types (e.g. "Depends On"). The default ArgoBument
426
+ * (schema-bundle.config.json), not hardcoded ArchiMate names, so a custom schema can
427
+ * declare its own relationship types (e.g. "Depends On"). The default ArchiMate 3.2
428
428
  * bundle declares the ArchiMate mapping.
429
429
  */
430
430
  const DELIVERY_DEPENDENCIES = (() => {
431
431
  try {
432
- const { loadSchemaBundleAndOntology } = require('./argob-schema.js');
432
+ const { loadSchemaBundleAndOntology } = require('./schema-bundle.js');
433
433
  return loadSchemaBundleAndOntology(repoRoot).ontology.deliveryDependencies;
434
434
  } catch {
435
435
  return { sourceDependsOnTarget: [], targetDependsOnSource: [] };
@@ -1,4 +1,4 @@
1
- 'use strict';
1
+ 'use strict';
2
2
 
3
3
  // ARGO schema-bundle resolution and ontology construction.
4
4
  //
@@ -6,18 +6,18 @@
6
6
  // "schema bundle" is a directory that carries the graph contract:
7
7
  //
8
8
  // <bundle>/SystemArchitecture.schema.json (required) JSON Schema of the graph
9
- // <bundle>/argob.config.json (optional) bundle descriptor:
9
+ // <bundle>/schema-bundle.config.json (optional) bundle descriptor:
10
10
  // language, enum locations, guide,
11
11
  // rules file, invariant switches
12
- // <bundle>/argob-rules.json (optional) ontology rules data
12
+ // <bundle>/schema-bundle.rules.json (optional) ontology rules data
13
13
  // (type metadata, relationship
14
14
  // categories, endpoint matrix)
15
- // <bundle>/ARGOB.md (optional) human-readable guide
15
+ // <bundle>/GUIDE.md (optional) human-readable guide
16
16
  //
17
17
  // Resolution precedence (first bundle that has SystemArchitecture.schema.json):
18
- // 1. ARGO_SCHEMA_DIR — explicit override (tests / hosts)
19
- // 2. <workspaceRoot>/.argo/schema — the repository's own schema
20
- // 3. <argoRoot>/schema — the default ArgoBument schema
18
+ // 1. ARGO_SCHEMA_DIR 鈥?explicit override (tests / hosts)
19
+ // 2. <workspaceRoot>/.argo/schema 鈥?the repository's own schema
20
+ // 3. <argoRoot>/schema 鈥?the default ArchiMate 3.2 schema
21
21
  //
22
22
  // The default bundle keeps the historical ArchiMate 3.2 + ARGO behaviour. A
23
23
  // custom bundle may define its own element/relationship types and, optionally,
@@ -29,9 +29,9 @@ const path = require('node:path');
29
29
  const { getArgoRoot } = require('./argo-paths.js');
30
30
 
31
31
  const SCHEMA_BASENAME = 'SystemArchitecture.schema.json';
32
- const CONFIG_BASENAME = 'argob.config.json';
33
- const RULES_BASENAME = 'argob-rules.json';
34
- const GUIDE_BASENAME = 'ARGOB.md';
32
+ const CONFIG_BASENAME = 'schema-bundle.config.json';
33
+ const RULES_BASENAME = 'schema-bundle.rules.json';
34
+ const GUIDE_BASENAME = 'GUIDE.md';
35
35
  const DEFAULT_GUIDE_BASENAME = 'archimate3.2.md';
36
36
  const DEFAULT_LANGUAGE = 'ArchiMate 3.2';
37
37
  const DEFAULT_ROOT_VIEW_NAME = 'SystemArchitecture';
@@ -39,8 +39,8 @@ const DEFAULT_MAX_ELEMENTS_PER_VIEW = 15;
39
39
  const DEFAULT_ACTOR_ELEMENT_TYPE = 'Business Actor';
40
40
 
41
41
  // Which relationship types express a delivery dependency and in which direction.
42
- // Declared per bundle via argob.config.json "deliveryDependencies"; the default
43
- // ArgoBument bundle keeps the ArchiMate mapping below (previous behaviour).
42
+ // Declared per bundle via schema-bundle.config.json "deliveryDependencies"; the default
43
+ // ArchiMate 3.2 bundle keeps the ArchiMate mapping below (previous behaviour).
44
44
  const ARCHIMATE_DELIVERY_DEPENDENCIES = Object.freeze({
45
45
  sourceDependsOnTarget: Object.freeze(['Access', 'Assignment', 'Specialization', 'Composition', 'Aggregation']),
46
46
  targetDependsOnSource: Object.freeze(['Serving', 'Realization', 'Flow', 'Triggering', 'Influence']),
@@ -103,8 +103,8 @@ function buildBundle(kind, dir, workspaceRoot) {
103
103
 
104
104
  const configFile = path.join(dir, CONFIG_BASENAME);
105
105
  const fileConfig = isFile(configFile) ? readJsonFile(configFile) : {};
106
- const inlineConfig = schema && typeof schema['x-argob'] === 'object' && schema['x-argob'] !== null
107
- ? schema['x-argob']
106
+ const inlineConfig = schema && typeof schema['x-schema-bundle'] === 'object' && schema['x-schema-bundle'] !== null
107
+ ? schema['x-schema-bundle']
108
108
  : {};
109
109
  const config = { ...inlineConfig, ...fileConfig };
110
110
 
@@ -276,7 +276,7 @@ function validateBundle({ language, dialect, elementTypes, relationshipTypes, ac
276
276
  if (!elementTypeList.includes(actorElementType)) {
277
277
  errors.push(
278
278
  `schema bundle '${language}' declares actorElementType '${actorElementType}' which is not one of its element types; ` +
279
- `set a valid actorElementType in argob.config.json (one of: ${elementTypeList.join(', ') || '(none)'}) ` +
279
+ `set a valid actorElementType in schema-bundle.config.json (one of: ${elementTypeList.join(', ') || '(none)'}) ` +
280
280
  `or set "actorElementType": null if the schema has no actor concept`,
281
281
  );
282
282
  }
@@ -338,7 +338,7 @@ function buildClassMatrixOntology(bundle) {
338
338
  let validateRelationshipEndpointTypes;
339
339
 
340
340
  if (rules) {
341
- // Data-driven default: the bundle ships its own rule data (argob-rules.json),
341
+ // Data-driven default: the bundle ships its own rule data (schema-bundle.rules.json),
342
342
  // so the DEFAULT schema is replaceable file-for-file exactly like a custom one.
343
343
  const classByType = rules.archimateClassByElementType || {};
344
344
  const classMatrix = rules.relationshipTargetMatrix || {};
@@ -371,7 +371,7 @@ function buildClassMatrixOntology(bundle) {
371
371
  return [];
372
372
  };
373
373
  } else {
374
- // Legacy fallback: an installation without argob-rules.json uses the bundled module.
374
+ // Legacy fallback: an installation without schema-bundle.rules.json uses the bundled module.
375
375
  const mod = require('./archimate32-rules.js');
376
376
  elementTypeMetadata = mod.elementTypeMetadata;
377
377
  relationshipCategoryByType = mod.relationshipCategoryByType;
@@ -135,7 +135,7 @@ const {
135
135
  loadSchemaBundleAndOntology,
136
136
  resolveSchemaBundle,
137
137
  resolveTypeEnums,
138
- } = require('./argob-schema.js');
138
+ } = require('./schema-bundle.js');
139
139
  const {
140
140
  createProductionGraphRagRuntime,
141
141
  } = require('./graph-rag/productionGraphRagRuntime.js');
@@ -1017,7 +1017,7 @@ function buildGraphIndex(document, ontology) {
1017
1017
  }
1018
1018
 
1019
1019
  // Dependency direction for the semantic-edge walk comes from the active schema
1020
- // bundle's deliveryDependencies; this is the ArgoBument fallback by default.
1020
+ // bundle's deliveryDependencies; this is the ArchiMate 3.2 fallback by default.
1021
1021
  const DEFAULT_DELIVERY_DEPENDENCIES = Object.freeze({
1022
1022
  sourceDependsOnTarget: Object.freeze(['Access', 'Assignment', 'Specialization', 'Composition', 'Aggregation']),
1023
1023
  targetDependsOnSource: Object.freeze(['Serving', 'Realization', 'Flow', 'Triggering', 'Influence']),
@@ -7,7 +7,7 @@ const {
7
7
 
8
8
  const {
9
9
  loadSchemaBundleAndOntology,
10
- } = require('./argob-schema.js');
10
+ } = require('./schema-bundle.js');
11
11
 
12
12
  const repoRoot = getWorkspaceRoot();
13
13
  const graphRelativePath = path.join('design', 'KG', 'SystemArchitecture.json');
@@ -26,7 +26,7 @@ const SCRIPT_CANDIDATES = {
26
26
  const TOOLS = [
27
27
  {
28
28
  name: 'validateSystemArchitecture',
29
- description: 'Validate design/KG/SystemArchitecture.json against the workspace-resolved schema bundle (the default ArgoBument schema, or the repository\'s own .argo/schema) and Argo graph rules.',
29
+ description: 'Validate design/KG/SystemArchitecture.json against the workspace-resolved schema bundle (the default ArchiMate 3.2 schema, or the repository\'s own .argo/schema) and Argo graph rules.',
30
30
  inputSchema: {
31
31
  type: 'object',
32
32
  properties: {},
@@ -17,7 +17,7 @@ disable-model-invocation: true
17
17
  ## Rules
18
18
 
19
19
  - **MUST** 调用 ARGO MCP 工具 `initializeWorkspace`(传当前工作区根)执行确定性初始化,并以其返回报告为最终判断依据。
20
- - **MUST** 报告当前 schema:`initializeWorkspace` 返回的 `schema`(或 harness 的 `schemaBundle`)中的 `kind`(default=内置 ArgoBument / workspace=仓内自定义 / override)、`language`(名称)、`actorElementType`、`dir`、`guide`;输出形如 `schema: default / ArchiMate 3.2`。
20
+ - **MUST** 报告当前 schema:`initializeWorkspace` 返回的 `schema`(或 harness 的 `schemaBundle`)中的 `kind`(default=内置 ArchiMate 3.2 / workspace=仓内自定义 / override)、`language`(名称)、`actorElementType`、`dir`、`guide`;输出形如 `schema: default / ArchiMate 3.2`。
21
21
  - **MUST** 报告 `mcp` / `systemArchitecture` / `neo4j` / `qeaFullProjection` / `semanticLifecycle` / `subdiagramViews` 与整体 `status`。
22
22
  - **MUST** 核验并报告:① `.qea` 投影是否成功(`qeaFullProjection.status`),且投影目标 `qeaFullProjection.qea` 是否为**本仓库自己的 .qea 文件**(解析自 `ARGO_EA_QEA` 或仓库根唯一 `*.qea`);目标不是本仓库文件或投影失败 → 报告为告警/失败,不得视为 init 成功。
23
23
  - **MUST** 核验并报告:Neo4j 投影目标数据库名(`neo4j.database`)是否**与本仓库名一致**(仓库 basename == 数据库名);不一致 → 报告为告警/失败。
@@ -69,7 +69,7 @@ disable-model-invocation: true
69
69
 
70
70
  ### 1. Environment Status
71
71
  - overall status: ok / failed
72
- - **解析到的 schema:kind(default/workspace/override)+ language(名称)+ actorElementType + dir/guide**(默认 ArgoBument 还是仓内自定义 schema)
72
+ - **解析到的 schema:kind(default/workspace/override)+ language(名称)+ actorElementType + dir/guide**(默认 ArchiMate 3.2 还是仓内自定义 schema)
73
73
  - whether mcp health passed
74
74
  - whether neo4j health passed
75
75
  - whether .qea full projection passed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo-beta",
3
- "version": "0.27.0-beta.0",
3
+ "version": "0.27.0-beta.1",
4
4
  "description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
5
5
  "license": "MIT",
6
6
  "bin": {