archgraph-argo-beta 0.27.0-beta.0 → 0.27.0-beta.2
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 +1 -1
- package/argo/rules/archgraph.instructions.md +1 -1
- package/argo/schema/{argob.config.json → schema-bundle.config.json} +2 -2
- package/argo/schema/{argob-rules.json → schema-bundle.rules.json} +1 -1
- package/argo/scripts/argo-mcp-server.js +13 -5
- package/argo/scripts/ensureArgoHarnessEnvironment.js +1 -1
- package/argo/scripts/graph-semantics.js +3 -3
- package/argo/scripts/runArchitectureTests.js +3 -3
- package/argo/scripts/{argob-schema.js → schema-bundle.js} +17 -17
- package/argo/scripts/systemarchitecture-mcp-server.js +46 -9
- package/argo/scripts/validateSystemArchitecture.js +1 -1
- package/argo/scripts/validator-mcp-server.js +1 -1
- package/argo/skills/argo-init/SKILL.md +2 -2
- package/package.json +1 -1
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
|
|
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
|
|
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": "
|
|
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
|
|
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
|
|
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('./
|
|
17
|
+
} = require('./schema-bundle.js');
|
|
18
18
|
const {
|
|
19
19
|
externalQueryRequested,
|
|
20
20
|
queryExternalRead,
|
|
@@ -420,6 +420,13 @@ async function callTool(name, args = {}, progressToken = null, dependencies = un
|
|
|
420
420
|
tool: name,
|
|
421
421
|
args,
|
|
422
422
|
});
|
|
423
|
+
// getSystemArchitecture declares an outputSchema, so its result MUST carry
|
|
424
|
+
// matching structuredContent even on the cross-project path (which bypasses
|
|
425
|
+
// the systemarchitecture module's own toolResult). A missing
|
|
426
|
+
// structuredContent makes the MCP client reject the call with -32600.
|
|
427
|
+
if (name === 'getSystemArchitecture') {
|
|
428
|
+
return toolResult(result, systemArchitectureMcp.buildGetSystemArchitectureStructuredContent(result));
|
|
429
|
+
}
|
|
423
430
|
return toolResult(result);
|
|
424
431
|
}
|
|
425
432
|
if (name === 'initializeWorkspace') {
|
|
@@ -438,7 +445,7 @@ async function callTool(name, args = {}, progressToken = null, dependencies = un
|
|
|
438
445
|
return toolResult({
|
|
439
446
|
status: report.status,
|
|
440
447
|
workspaceRoot: workspace.workspaceRoot,
|
|
441
|
-
// The resolved modeling language for this workspace (default
|
|
448
|
+
// The resolved modeling language for this workspace (default ArchiMate 3.2 vs
|
|
442
449
|
// the repository's own .argo/schema bundle) so init names the active schema.
|
|
443
450
|
schema: workspace.schema,
|
|
444
451
|
schemaBundle: report.schemaBundle,
|
|
@@ -535,7 +542,7 @@ async function initializeWorkspace(workspaceRoot) {
|
|
|
535
542
|
const graphTargetPath = path.join(workspaceRoot, ...WORKSPACE_GRAPH_PATH_SEGMENTS);
|
|
536
543
|
const graphRelativePath = normalizeRelativePath(path.relative(workspaceRoot, graphTargetPath));
|
|
537
544
|
if (!fs.existsSync(graphTargetPath)) {
|
|
538
|
-
// Only the built-in
|
|
545
|
+
// Only the built-in ArchiMate 3.2 default schema auto-provides a graph (the
|
|
539
546
|
// packaged default). For any custom / replaced schema the graph is the user's
|
|
540
547
|
// own: never copy the packaged (mismatched) graph — fail closed if missing.
|
|
541
548
|
let ontology = null;
|
|
@@ -590,7 +597,7 @@ async function initializeWorkspace(workspaceRoot) {
|
|
|
590
597
|
} catch (error) {
|
|
591
598
|
qeaFullProjection = { status: 'failed', error: String(error && error.message ? error.message : error) };
|
|
592
599
|
}
|
|
593
|
-
// Report which schema this workspace resolves to (default
|
|
600
|
+
// Report which schema this workspace resolves to (default ArchiMate 3.2 vs a
|
|
594
601
|
// repository's own .argo/schema bundle) so the caller/human can see the active
|
|
595
602
|
// modeling language right after init.
|
|
596
603
|
let schema;
|
|
@@ -678,7 +685,7 @@ function normalizeRelativePath(value) {
|
|
|
678
685
|
return String(value).replace(/\\/g, '/');
|
|
679
686
|
}
|
|
680
687
|
|
|
681
|
-
function toolResult(payload) {
|
|
688
|
+
function toolResult(payload, structuredContent = undefined) {
|
|
682
689
|
return {
|
|
683
690
|
content: [
|
|
684
691
|
{
|
|
@@ -686,6 +693,7 @@ function toolResult(payload) {
|
|
|
686
693
|
text: JSON.stringify(payload, null, 2),
|
|
687
694
|
},
|
|
688
695
|
],
|
|
696
|
+
...(structuredContent === undefined ? {} : { structuredContent }),
|
|
689
697
|
isError: payload.status === 'failed',
|
|
690
698
|
};
|
|
691
699
|
}
|
|
@@ -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('./
|
|
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
|
|
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('./
|
|
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
|
|
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
|
-
* (
|
|
427
|
-
* declare its own relationship types (e.g. "Depends On"). The default
|
|
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('./
|
|
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>/
|
|
9
|
+
// <bundle>/schema-bundle.config.json (optional) bundle descriptor:
|
|
10
10
|
// language, enum locations, guide,
|
|
11
11
|
// rules file, invariant switches
|
|
12
|
-
// <bundle>/
|
|
12
|
+
// <bundle>/schema-bundle.rules.json (optional) ontology rules data
|
|
13
13
|
// (type metadata, relationship
|
|
14
14
|
// categories, endpoint matrix)
|
|
15
|
-
// <bundle>/
|
|
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
|
|
19
|
-
// 2. <workspaceRoot>/.argo/schema
|
|
20
|
-
// 3. <argoRoot>/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 = '
|
|
33
|
-
const RULES_BASENAME = '
|
|
34
|
-
const GUIDE_BASENAME = '
|
|
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
|
|
43
|
-
//
|
|
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-
|
|
107
|
-
? schema['x-
|
|
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
|
|
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 (
|
|
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
|
|
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('./
|
|
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
|
|
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']),
|
|
@@ -2699,15 +2699,51 @@ function compactMutationResponse(payload) {
|
|
|
2699
2699
|
return compact;
|
|
2700
2700
|
}
|
|
2701
2701
|
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2702
|
+
// The typed getSystemArchitecture output contract (see
|
|
2703
|
+
// GET_SYSTEM_ARCHITECTURE_OUTPUT_SCHEMA). The error variant allows only the
|
|
2704
|
+
// listed keys, so any error (local or mirrored from a cross-project read) is
|
|
2705
|
+
// projected onto that shape with category + message guaranteed. Exposed so the
|
|
2706
|
+
// argo MCP server can build the SAME structuredContent for a cross-project read
|
|
2707
|
+
// (which bypasses this module's callTool) instead of returning a result without
|
|
2708
|
+
// structuredContent — which violates the declared outputSchema (-32600).
|
|
2709
|
+
const GET_SYSTEM_ARCHITECTURE_ERROR_KEYS = Object.freeze([
|
|
2710
|
+
'category', 'message', 'action', 'fullSnapshotFallback', 'state',
|
|
2711
|
+
'canonicalVersion', 'contentVersion', 'indexVersion',
|
|
2712
|
+
'completedChannels', 'missingChannels', 'mismatchedChannels',
|
|
2713
|
+
]);
|
|
2714
|
+
|
|
2715
|
+
function normalizeGetSystemArchitectureError(error) {
|
|
2716
|
+
const source = error && typeof error === 'object' ? error : {};
|
|
2717
|
+
const normalized = {};
|
|
2718
|
+
for (const key of GET_SYSTEM_ARCHITECTURE_ERROR_KEYS) {
|
|
2719
|
+
if (Object.prototype.hasOwnProperty.call(source, key) && source[key] !== undefined) {
|
|
2720
|
+
normalized[key] = source[key];
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
if (typeof normalized.category !== 'string' || normalized.category === '') {
|
|
2724
|
+
normalized.category = 'GET_SYSTEM_ARCHITECTURE_ERROR';
|
|
2725
|
+
}
|
|
2726
|
+
if (typeof normalized.message !== 'string' || normalized.message === '') {
|
|
2727
|
+
normalized.message = typeof source.reason === 'string' && source.reason !== ''
|
|
2728
|
+
? source.reason
|
|
2729
|
+
: 'getSystemArchitecture failed';
|
|
2730
|
+
}
|
|
2731
|
+
return normalized;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
function buildGetSystemArchitectureStructuredContent(payload) {
|
|
2735
|
+
const failed = Boolean(payload) && payload.status === 'failed';
|
|
2736
|
+
return {
|
|
2705
2737
|
version: '1.0',
|
|
2706
2738
|
mode: failed ? 'error' : 'semantic-query',
|
|
2707
|
-
document: failed ? null : (payload.document === undefined ? null : payload.document),
|
|
2708
|
-
query: failed ? null : (payload.query || null),
|
|
2709
|
-
error: failed ? payload.error : null,
|
|
2710
|
-
}
|
|
2739
|
+
document: failed ? null : (payload && payload.document === undefined ? null : payload.document),
|
|
2740
|
+
query: failed ? null : ((payload && payload.query) || null),
|
|
2741
|
+
error: failed ? normalizeGetSystemArchitectureError(payload.error) : null,
|
|
2742
|
+
};
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
function getSystemArchitectureResult(payload) {
|
|
2746
|
+
return toolResult(payload, buildGetSystemArchitectureStructuredContent(payload));
|
|
2711
2747
|
}
|
|
2712
2748
|
|
|
2713
2749
|
async function callTool(name, args = {}, dependencies = undefined) {
|
|
@@ -4488,6 +4524,7 @@ if (require.main === module) {
|
|
|
4488
4524
|
|
|
4489
4525
|
module.exports = {
|
|
4490
4526
|
GET_SYSTEM_ARCHITECTURE_OUTPUT_SCHEMA,
|
|
4527
|
+
buildGetSystemArchitectureStructuredContent,
|
|
4491
4528
|
TOOLS,
|
|
4492
4529
|
applyMutations,
|
|
4493
4530
|
buildBusinessSemanticSummary,
|
|
@@ -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
|
|
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=内置
|
|
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**(默认
|
|
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