archgraph-argo 0.5.1 → 0.6.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/README.md CHANGED
@@ -4,12 +4,10 @@ An architecture-graph driven framework for Agentic Engineering.
4
4
 
5
5
  ## What is this?
6
6
 
7
- `ArchGraph` treats an **intent architecture graph** as the single source of
8
- truth for agentic engineering. Every piece of work starts from an element in the graph — a Work
9
- Package, a Skill, a Rule, a Viewpoint, or an Application Component — and every repository change is
10
- traced back to that element.
7
+ ArchGraph builds a **unified language** that puts harness design and target product design into
8
+ **one model** — so you get a single view to work and observe, and real control over your agents.
11
9
 
12
- The canonical graph lives at [`design/KG/SystemArchitecture.json`](design/KG/SystemArchitecture.json).
10
+ ![alt text](docs/diagrams/image.png)
13
11
 
14
12
  ## Architecture
15
13
 
@@ -21,94 +19,27 @@ engineering:
21
19
 
22
20
  Editable source: [`docs/diagrams/global-architecture.excalidraw`](docs/diagrams/global-architecture.excalidraw)
23
21
 
24
- ## Core principles
25
-
26
- 1. **Arm before acting** — before any development, pull the Work Package's associated Skills and
27
- Rules and materialize them under `~/.copilot/skills/<name>/SKILL.md` (user-level) or
28
- `.github/skills/<name>/SKILL.md` (project) and `*.instructions.md`.
29
- 2. **Find the element first** — every repository change maps to an architecture element. If none
30
- exists, create one inside a sensible View and Viewpoint.
31
- 3. **Acceptance tests first** — check the affected acceptance cases before changing anything.
32
- Tests verify elements from the outside (GIVEN-WHEN-THEN), never their internals.
33
- 4. **Commit traceability** — after each change, commit and register the commit id plus file paths
34
- back into the graph element.
35
-
36
- These rules are encoded as user-level instructions `argo-copilot-instructions.instructions.md`
37
- in the VS Code Copilot prompts folder (`%APPDATA%\Code\User\prompts`).
38
-
39
- ## Repository map
40
-
41
- | Path | Purpose |
42
- | --- | --- |
43
- | `design/KG/SystemArchitecture.json` | Canonical intent architecture graph (single source of truth) |
44
- | `%APPDATA%\Code\User\prompts\argo-copilot-instructions.instructions.md` | Global agent rules (user-level) |
45
- | `~/.copilot/skills/argo-init/SKILL.md` | ARGO harness init skill (user-level) |
46
- | `.github/kglibrary.instructions.md` | Global rule for `KGlibrary/*/info.md` frontmatter format |
47
- | `.github/skills/<name>/SKILL.md` | Skills materialized from the graph (`argo-init`, `create-github-repository-page`, `diagram-draw`, `optimize-web-layout-style`) |
48
- | `.argo/` | ARGO harness: MCP server, schema, validators, semantic (Graph RAG) lifecycle and Neo4j sync |
49
- | `KGlibrary/` | Reference project knowledge library |
50
- | `index.html` | GitHub Pages home site |
51
- | `tests/` | Executable acceptance tests (Node.js built-in test runner) |
52
-
53
- ## How to use
54
-
55
- `ArchGraph` is an agentic engineering framework driven by a knowledge graph —
56
- the intent architecture graph — whose schema complies with **ArchiMate 3.2**.
57
-
58
- To adopt it as the building framework for another project, copy the following into the target project:
59
-
60
- 1. **`.argo/`** — the ARGO harness: the MCP server, the ArchiMate 3.2 schema, validators, the
61
- semantic (Graph RAG) lifecycle, and Neo4j sync.
62
- 2. **One agent-host configuration directory**, depending on which agent you use:
63
- - `.github/` — GitHub Copilot / VS Code
64
- - `.opencode/` — opencode
65
- - `.cursor/` — Cursor
66
-
67
- Each directory carries the global rules, the materialized skills, and the `argo` MCP wiring.
68
- 3. **The `.feap` Enterprise Architect model** — the ArchiMate 3.2 model used to author the
69
- knowledge graph (the `feap` tool).
70
-
71
- Then point your agent at the harness (`node .argo/scripts/argo-mcp-server.js`) and bootstrap the
72
- environment:
73
-
74
- ```powershell
75
- node .argo/scripts/ensureArgoHarnessEnvironment.js
76
- ```
77
-
78
- ## ARGO MCP harness
79
-
80
- Read and write the intent architecture through the **ARGO MCP server** — configured in
81
- [`.github/mcp.json`](.github/mcp.json) and served by `node .argo/scripts/argo-mcp-server.js`.
82
- Never edit `design/KG/SystemArchitecture.json` directly.
83
-
84
- Bootstrap or health-check the harness with:
22
+ ## Install
85
23
 
86
24
  ```powershell
87
- node .argo/scripts/ensureArgoHarnessEnvironment.js
25
+ npm install -g archgraph-argo
26
+ argo-deploy
88
27
  ```
89
28
 
90
- The harness validates the graph against `.argo/schema/SystemArchitecture.schema.json`, supports a
91
- semantic (Graph RAG) query lifecycle, and can sync the graph into Neo4j (`neo4j-driver`).
92
-
93
- ## KGlibrary reference library
29
+ Done &mdash; the ARGO toolchain, skills, and rules are deployed, and the `argo` MCP server is registered automatically.
94
30
 
95
- Each project under `KGlibrary/<project>/` provides an `info.md` with YAML frontmatter keys
96
- (`name`, `description`, `repo`, `branch`, `commit_id`) so the home site and agents can uniformly
97
- consume reference project information. See
98
- [`.github/kglibrary.instructions.md`](.github/kglibrary.instructions.md).
31
+ > Semantic (Graph RAG) queries also need **Neo4j** and a **vector engine** configured in
32
+ > `~/.argo/.env`; everything else works out of the box.
99
33
 
100
- ## Tests
101
-
102
- Run the acceptance suite with:
34
+ ## How to use
103
35
 
104
- ```powershell
105
- node --test "tests/*.test.js"
106
- ```
36
+ After installing, open your project and start a coding agent. It will:
107
37
 
108
- ## Requirements
38
+ 1. locate the architecture element behind the task before changing anything,
39
+ 2. arm itself with that element's Skills and Rules,
40
+ 3. work test-first (GIVEN-WHEN-THEN), and trace every commit back to the graph.
109
41
 
110
- - Node.js (built-in `node:test` runner)
111
- - Optional: a reachable Neo4j database for the semantic lifecycle / sync tooling
42
+ The intent architecture graph — modelled in **ArchiMate 3.2** — is the single source of truth.
112
43
 
113
44
  ## License
114
45
 
@@ -0,0 +1,207 @@
1
+ {
2
+ "name": "System",
3
+ "description": "Exported from EA package System",
4
+ "elements": [
5
+ {
6
+ "id": "1207",
7
+ "name": "StakeholderIntentViewpoint",
8
+ "type": "Grouping",
9
+ "description": "Baseline viewpoint for stakeholder concerns, business intent, and success value.",
10
+ "attributes": [
11
+ {
12
+ "name": "modelingSkillPaths",
13
+ "value": ".argo/skills/modeling/stakeholder-viewpoint/SKILL.md; .argo/skills/modeling/goal-realization-viewpoint/SKILL.md; .argo/skills/modeling/motivation-viewpoint/SKILL.md"
14
+ }
15
+ ],
16
+ "subdiagram_views": [
17
+ {
18
+ "view_id": "159",
19
+ "view_name": "StakeholderIntentViewpoint"
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ "id": "1208",
25
+ "name": "OutcomeCapabilityViewpoint",
26
+ "type": "Grouping",
27
+ "description": "Baseline viewpoint for outcomes, capabilities, value streams, and capability boundaries.",
28
+ "attributes": [
29
+ {
30
+ "name": "modelingSkillPaths",
31
+ "value": ".argo/skills/modeling/strategy-viewpoint/SKILL.md; .argo/skills/modeling/capability-map-viewpoint/SKILL.md; .argo/skills/modeling/value-stream-viewpoint/SKILL.md; .argo/skills/modeling/outcome-realization-viewpoint/SKILL.md; .argo/skills/modeling/resource-map-viewpoint/SKILL.md"
32
+ }
33
+ ],
34
+ "subdiagram_views": [
35
+ {
36
+ "view_id": "160",
37
+ "view_name": "OutcomeCapabilityViewpoint"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "id": "1209",
43
+ "name": "BusinessBehaviorViewpoint",
44
+ "type": "Grouping",
45
+ "description": "Baseline viewpoint for business roles, processes, events, and domain objects.",
46
+ "attributes": [
47
+ {
48
+ "name": "modelingSkillPaths",
49
+ "value": ".argo/skills/modeling/organization-viewpoint/SKILL.md; .argo/skills/modeling/product-viewpoint/SKILL.md; .argo/skills/modeling/business-process-cooperation-viewpoint/SKILL.md; .argo/skills/modeling/service-realization-viewpoint/SKILL.md"
50
+ }
51
+ ],
52
+ "subdiagram_views": [
53
+ {
54
+ "view_id": "161",
55
+ "view_name": "BusinessBehaviorViewpoint"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "id": "1210",
61
+ "name": "CapabilityRealizationViewpoint",
62
+ "type": "Grouping",
63
+ "description": "Baseline viewpoint for tracing business capabilities to application services, components, and system responsibilities.",
64
+ "attributes": [
65
+ {
66
+ "name": "modelingSkillPaths",
67
+ "value": ".argo/skills/modeling/requirements-realization-viewpoint/SKILL.md; .argo/skills/modeling/application-usage-viewpoint/SKILL.md; .argo/skills/modeling/application-structure-viewpoint/SKILL.md; .argo/skills/modeling/application-cooperation-viewpoint/SKILL.md; .argo/skills/modeling/information-structure-viewpoint/SKILL.md; .argo/skills/modeling/technology-usage-viewpoint/SKILL.md; .argo/skills/modeling/technology-viewpoint/SKILL.md; .argo/skills/modeling/implementation-deployment-viewpoint/SKILL.md"
68
+ }
69
+ ],
70
+ "subdiagram_views": [
71
+ {
72
+ "view_id": "162",
73
+ "view_name": "CapabilityRealizationViewpoint"
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ "id": "1211",
79
+ "name": "AcceptanceDeliveryViewpoint",
80
+ "type": "Grouping",
81
+ "description": "Baseline viewpoint for acceptance semantics, risk, cross-cutting concerns, dependency order, and delivery sequencing.",
82
+ "attributes": [
83
+ {
84
+ "name": "modelingSkillPaths",
85
+ "value": ".argo/skills/modeling/project-viewpoint/SKILL.md; .argo/skills/modeling/migration-viewpoint/SKILL.md; .argo/skills/modeling/implementation-migration-viewpoint/SKILL.md; .argo/skills/modeling/layered-viewpoint/SKILL.md; .argo/skills/modeling/physical-viewpoint/SKILL.md"
86
+ }
87
+ ],
88
+ "subdiagram_views": [
89
+ {
90
+ "view_id": "163",
91
+ "view_name": "AcceptanceDeliveryViewpoint"
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "relationships": [
97
+ {
98
+ "id": "3001",
99
+ "name": "Baseline viewpoint association",
100
+ "type": "Association",
101
+ "source_id": "1207",
102
+ "target_id": "1208",
103
+ "source_name": "StakeholderIntentViewpoint",
104
+ "target_name": "OutcomeCapabilityViewpoint",
105
+ "description": "Baseline navigation from stakeholder intent to outcome and capability scope.",
106
+ "statement": "StakeholderIntentViewpoint --(Association)--> OutcomeCapabilityViewpoint"
107
+ },
108
+ {
109
+ "id": "3002",
110
+ "name": "Baseline viewpoint association",
111
+ "type": "Association",
112
+ "source_id": "1208",
113
+ "target_id": "1209",
114
+ "source_name": "OutcomeCapabilityViewpoint",
115
+ "target_name": "BusinessBehaviorViewpoint",
116
+ "description": "Baseline navigation from outcome and capability scope to observable business behavior.",
117
+ "statement": "OutcomeCapabilityViewpoint --(Association)--> BusinessBehaviorViewpoint"
118
+ },
119
+ {
120
+ "id": "3003",
121
+ "name": "Baseline viewpoint association",
122
+ "type": "Association",
123
+ "source_id": "1209",
124
+ "target_id": "1210",
125
+ "source_name": "BusinessBehaviorViewpoint",
126
+ "target_name": "CapabilityRealizationViewpoint",
127
+ "description": "Baseline navigation from business behavior to capability realization responsibilities.",
128
+ "statement": "BusinessBehaviorViewpoint --(Association)--> CapabilityRealizationViewpoint"
129
+ },
130
+ {
131
+ "id": "3004",
132
+ "name": "Baseline viewpoint association",
133
+ "type": "Association",
134
+ "source_id": "1210",
135
+ "target_id": "1211",
136
+ "source_name": "CapabilityRealizationViewpoint",
137
+ "target_name": "AcceptanceDeliveryViewpoint",
138
+ "description": "Baseline navigation from realization responsibilities to acceptance and delivery sequencing.",
139
+ "statement": "CapabilityRealizationViewpoint --(Association)--> AcceptanceDeliveryViewpoint"
140
+ }
141
+ ],
142
+ "views": [
143
+ {
144
+ "view_id": "159",
145
+ "view_name": "StakeholderIntentViewpoint",
146
+ "parent_element_id": "1207",
147
+ "parent_element_name": "StakeholderIntentViewpoint",
148
+ "description": "ArchiMate-inspired motivation viewpoint for framing stakeholder concerns before modeling solution details. Stakeholders: business partners, business managers, requirements owners, enterprise architects, and acceptors. Concerns: architecture mission, drivers for change, assessments, high-level goals, desired outcomes, value, principles, and hard constraints. Purpose: designing, deciding, and informing. Scope: motivation and strategy context. Use this view to answer who cares, why the change matters, what success means, and which constraints cannot be violated. Typical elements: Stakeholder, Driver, Assessment, Goal, Outcome, Value, Meaning, Principle, Requirement, Constraint, Course of Action. Do not place implementation components here unless they are needed only as evidence for a stakeholder concern.",
149
+ "included_elements": [],
150
+ "included_relationships": []
151
+ },
152
+ {
153
+ "view_id": "160",
154
+ "view_name": "OutcomeCapabilityViewpoint",
155
+ "parent_element_id": "1208",
156
+ "parent_element_name": "OutcomeCapabilityViewpoint",
157
+ "description": "ArchiMate-inspired strategy viewpoint combining Strategy, Capability Map, Value Stream, and Outcome Realization concerns. Stakeholders: business managers, product owners, enterprise architects, business architects, and portfolio decision-makers. Concerns: business-oriented results, capability boundaries, value streams, resources, investment focus, and capability-to-outcome coverage. Purpose: designing and deciding. Scope: strategy with links to motivation and core elements when needed. Use this view to answer what business outcomes are in scope, which capabilities create or support them, and where value is produced. Typical elements: Outcome, Capability, Value Stream, Resource, Course of Action, Product, Value, Meaning, and selectively core elements that realize outcomes. Do not decompose detailed workflows or technical implementation here.",
158
+ "included_elements": [],
159
+ "included_relationships": []
160
+ },
161
+ {
162
+ "view_id": "161",
163
+ "view_name": "BusinessBehaviorViewpoint",
164
+ "parent_element_id": "1209",
165
+ "parent_element_name": "BusinessBehaviorViewpoint",
166
+ "description": "ArchiMate-inspired business behavior viewpoint drawing from Organization, Product, and Business Process Cooperation viewpoints. Stakeholders: process owners, domain experts, operational managers, business analysts, and product managers. Concerns: responsibilities, authority, business process dependencies, business services, product composition, contracts, shared information, and observable business events. Purpose: designing, deciding, and informing. Scope: mainly Business layer, with application links only when they explain business process support. Use this view to answer how the business works, who performs behavior, what events trigger it, what business objects are used, and what services or products are exposed. Typical elements: Business Actor, Business Role, Business Collaboration, Business Process, Business Function, Business Interaction, Business Event, Business Service, Business Object, Contract, Product, Representation. Do not turn this view into an application structure or code module map.",
167
+ "included_elements": [],
168
+ "included_relationships": []
169
+ },
170
+ {
171
+ "view_id": "162",
172
+ "view_name": "CapabilityRealizationViewpoint",
173
+ "parent_element_id": "1210",
174
+ "parent_element_name": "CapabilityRealizationViewpoint",
175
+ "description": "ArchiMate-inspired realization and usage viewpoint combining Requirements Realization, Application Usage, Service Realization, Application Cooperation, and Implementation and Deployment concerns. Stakeholders: enterprise architects, application architects, solution architects, process architects, and implementation designers. Concerns: how requirements, capabilities, business processes, and business services are realized by application services, components, data objects, and supporting technology; consistency, completeness, dependency visibility, and service orchestration. Purpose: designing and deciding. Scope: multiple layers and multiple aspects, but only along business-to-system realization paths. Use this view to answer how a business capability is carried by system responsibilities and which application or technology elements are relevant to that realization. Typical elements: Requirement, Constraint, Capability, Business Service, Business Process, Application Service, Application Component, Application Interface, Application Function or Process, Data Object, Technology Service, Node, Artifact. Do not include low-level implementation detail unless it changes a business-visible responsibility or dependency.",
176
+ "included_elements": [],
177
+ "included_relationships": []
178
+ },
179
+ {
180
+ "view_id": "163",
181
+ "view_name": "AcceptanceDeliveryViewpoint",
182
+ "parent_element_id": "1211",
183
+ "parent_element_name": "AcceptanceDeliveryViewpoint",
184
+ "description": "ArchiMate-inspired implementation and migration viewpoint extended with ARGO acceptance semantics. Stakeholders: business acceptors, project managers, operational managers, enterprise architects, delivery owners, and downstream agents. Concerns: acceptance control points, observation points, risk, work package scope, deliverables, plateaus, gaps, migration order, cross-cutting concerns, and consistency between delivery dependencies and architecture dependencies. Purpose: deciding and informing, with enough design detail to plan delivery. Scope: implementation and migration plus explicit business acceptance semantics. Use this view to answer how the change will be accepted, what must be observed, which work packages or plateaus are involved, what depends on what, and what risks could invalidate delivery. Typical elements: Goal, Outcome, Requirement, Constraint, Work Package, Deliverable, Implementation Event, Plateau, Gap, Business Actor, Business Role, and core elements affected by delivery. Do not use this view as a backlog dump; every item must affect acceptance, sequencing, or risk.",
185
+ "included_elements": [],
186
+ "included_relationships": []
187
+ },
188
+ {
189
+ "view_id": "158",
190
+ "view_name": "SystemArchitecture",
191
+ "description": "Top-level baseline architecture map governed by five universal business viewpoints. It follows the ArchiMate viewpoint mechanism: select content by stakeholder concerns, purpose, and scope, not by layer folders. The five child viewpoints provide the default AI navigation path from stakeholder intent to outcomes and capabilities, business behavior, capability realization, and acceptance-delivery sequencing. ArchiMate layers remain implicit in element types and may be used by validators or specialized sub-views, but they are not the default modeling entry point.",
192
+ "included_elements": [
193
+ "1207",
194
+ "1208",
195
+ "1209",
196
+ "1210",
197
+ "1211"
198
+ ],
199
+ "included_relationships": [
200
+ "3001",
201
+ "3002",
202
+ "3003",
203
+ "3004"
204
+ ]
205
+ }
206
+ ]
207
+ }
@@ -17,6 +17,7 @@ const {
17
17
  const {
18
18
  getWorkspaceRoot,
19
19
  hasStaticWorkspace,
20
+ resolveArgoPath,
20
21
  setMcpWorkspaceRoots,
21
22
  } = require('./argo-paths.js');
22
23
  const canonicalSemanticInitStorage = new AsyncLocalStorage();
@@ -25,6 +26,9 @@ const HANDOFF_FILES_TO_RESET = [
25
26
  ['.argo', 'temp', 'IntentToImplementationHandoff.json'],
26
27
  ['.argo', 'temp', 'ImplementationToCodingHandoff.json'],
27
28
  ];
29
+ const WORKSPACE_GRAPH_PATH_SEGMENTS = ['design', 'KG', 'SystemArchitecture.json'];
30
+ const BUNDLED_GRAPH_DEFAULT_SEGMENTS = ['defaults', 'design', 'KG', 'SystemArchitecture.json'];
31
+ const BUNDLED_EA_TEMPLATE_SEGMENTS = ['defaults', 'EA-model-template.feap'];
28
32
  const EA_TEMPLATE_PATH_CANDIDATES = [
29
33
  ['.opencode', 'customtools', 'EA-model-template.feap'],
30
34
  ['.opencode', 'EA-model-template.feap'],
@@ -409,6 +413,17 @@ async function initializeWorkspace(workspaceRoot) {
409
413
  const removedFiles = [];
410
414
  const skippedSteps = [];
411
415
 
416
+ const graphTargetPath = path.join(workspaceRoot, ...WORKSPACE_GRAPH_PATH_SEGMENTS);
417
+ const graphRelativePath = normalizeRelativePath(path.relative(workspaceRoot, graphTargetPath));
418
+ if (!fs.existsSync(graphTargetPath)) {
419
+ const graphSourcePath = resolveGraphDefaultSourcePath();
420
+ await fs.promises.mkdir(path.dirname(graphTargetPath), { recursive: true });
421
+ await fs.promises.copyFile(graphSourcePath, graphTargetPath);
422
+ createdFiles.push(graphRelativePath);
423
+ } else {
424
+ skippedSteps.push(`${graphRelativePath} already exists`);
425
+ }
426
+
412
427
  const templateSourcePath = resolveTemplateSourcePath(workspaceRoot);
413
428
  const targetFeapName = buildTargetFileName(workspaceName);
414
429
  const targetFeapPath = path.join(workspaceRoot, targetFeapName);
@@ -445,7 +460,22 @@ function resolveTemplateSourcePath(workspaceRoot) {
445
460
  return absolutePath;
446
461
  }
447
462
  }
448
- throw new Error(`Unable to locate EA template. Checked: ${EA_TEMPLATE_PATH_CANDIDATES.map(candidate => candidate.join('/')).join(', ')}`);
463
+
464
+ const bundledPath = resolveArgoPath(...BUNDLED_EA_TEMPLATE_SEGMENTS);
465
+ if (fs.existsSync(bundledPath)) {
466
+ return bundledPath;
467
+ }
468
+
469
+ throw new Error(`Unable to locate EA template. Checked: ${EA_TEMPLATE_PATH_CANDIDATES.map(candidate => candidate.join('/')).join(', ')}, and bundled ${BUNDLED_EA_TEMPLATE_SEGMENTS.join('/')}`);
470
+ }
471
+
472
+ function resolveGraphDefaultSourcePath() {
473
+ const bundledPath = resolveArgoPath(...BUNDLED_GRAPH_DEFAULT_SEGMENTS);
474
+ if (fs.existsSync(bundledPath)) {
475
+ return bundledPath;
476
+ }
477
+
478
+ throw new Error(`Unable to locate default SystemArchitecture template. Checked: bundled ${BUNDLED_GRAPH_DEFAULT_SEGMENTS.join('/')}`);
449
479
  }
450
480
 
451
481
  function buildTargetFileName(workspaceName) {
@@ -45,6 +45,10 @@ async function main() {
45
45
  };
46
46
 
47
47
  try {
48
+ report.workspaceBootstrap = await ensureWorkspaceBootstrap({
49
+ checkOnly: options.checkOnly,
50
+ workspaceRoot,
51
+ });
48
52
  report.mcp = verifyArgoMcpServer({ workspaceRoot });
49
53
  report.systemArchitecture = await verifyCanonicalSystemArchitecture();
50
54
  report.neo4j = await ensureNeo4jProjection({ checkOnly: options.checkOnly });
@@ -58,6 +62,9 @@ async function main() {
58
62
  report.error = formatErrorForReport(error);
59
63
  }
60
64
 
65
+ if (report.workspaceBootstrap && report.workspaceBootstrap.status === 'failed') {
66
+ report.status = 'failed';
67
+ }
61
68
  if (report.mcp && report.mcp.status === 'failed') {
62
69
  report.status = 'failed';
63
70
  }
@@ -99,6 +106,33 @@ function resolveWorkspaceRoot() {
99
106
  return getWorkspaceRoot();
100
107
  }
101
108
 
109
+ async function ensureWorkspaceBootstrap({ checkOnly, workspaceRoot }) {
110
+ if (checkOnly) {
111
+ return {
112
+ status: 'skipped',
113
+ reason: 'check-only',
114
+ };
115
+ }
116
+
117
+ try {
118
+ const workspace = await argoMcp.initializeWorkspace(workspaceRoot);
119
+ return {
120
+ status: 'ok',
121
+ workspaceRoot: workspace.workspaceRoot,
122
+ targetFeapName: workspace.targetFeapName,
123
+ createdFiles: workspace.createdFiles,
124
+ updatedFiles: workspace.updatedFiles,
125
+ removedFiles: workspace.removedFiles,
126
+ skippedSteps: workspace.skippedSteps,
127
+ };
128
+ } catch (error) {
129
+ return {
130
+ status: 'failed',
131
+ error: String(error && error.message ? error.message : error),
132
+ };
133
+ }
134
+ }
135
+
102
136
  async function ensureCanonicalSemanticLifecycle({ checkOnly, workspaceRoot, neo4j }) {
103
137
  if (checkOnly) {
104
138
  return {
@@ -11,6 +11,7 @@ disable-model-invocation: true
11
11
 
12
12
  - `argo` MCP 服务器(全局 `.argo` 安装)能正常初始化、列出关键工具并响应 `ping`。
13
13
  - `design/KG/SystemArchitecture.json` 可通过 `argo` MCP 正常读取和校验。
14
+ - 工作区缺少 `design/KG/SystemArchitecture.json` 时,非 `--check-only` 模式会自动从部署的 `defaults` 拷贝默认模板;工作区没有 `.feap` 时,自动以当前项目名拷贝默认 `EA-model-template.feap`。
14
15
  - 本机 Neo4j 连接可用。
15
16
  - canonical intent graph 至少完成一次 JSON -> Neo4j 初始同步,并通过一致性校验。
16
17
  - 非 `--check-only` 模式会在结构同步后执行语义生命周期:双 gate 未开启时记录 pending/disabled;双 gate 开启时执行全量 embedding backfill 与 readiness 对齐。
package/install-argo.ps1 CHANGED
@@ -23,28 +23,33 @@ Write-Host '==> Deploying Argo toolchain'
23
23
 
24
24
  $schemaSrc = Join-Path $argoDir 'schema'
25
25
  $schemaDest = Join-Path $ArgoRoot 'schema'
26
- Write-Host "[1/4] argo\schema -> $schemaDest"
26
+ Write-Host "[1/6] argo\schema -> $schemaDest"
27
27
  Copy-Tree -Source $schemaSrc -Destination $schemaDest
28
28
 
29
29
  $scriptsSrc = Join-Path $argoDir 'scripts'
30
30
  $scriptsDest = Join-Path $ArgoRoot 'scripts'
31
- Write-Host "[2/4] argo\scripts -> $scriptsDest"
31
+ Write-Host "[2/6] argo\scripts -> $scriptsDest"
32
32
  Copy-Tree -Source $scriptsSrc -Destination $scriptsDest
33
33
 
34
+ $defaultsSrc = Join-Path $argoDir 'defaults'
35
+ $defaultsDest = Join-Path $ArgoRoot 'defaults'
36
+ Write-Host "[3/6] argo\defaults -> $defaultsDest"
37
+ Copy-Tree -Source $defaultsSrc -Destination $defaultsDest
38
+
34
39
  $skillSrc = Join-Path (Join-Path $argoDir 'skills') 'argo-init'
35
40
  $skillDest = Join-Path $SkillsRoot 'argo-init'
36
- Write-Host "[3/4] argo\skills\argo-init -> $skillDest"
41
+ Write-Host "[4/6] argo\skills\argo-init -> $skillDest"
37
42
  Copy-Tree -Source $skillSrc -Destination $skillDest
38
43
 
39
44
  $ruleSrc = Join-Path (Join-Path $argoDir 'rules') 'archgraph.instructions.md'
40
45
  $ruleDest = Join-Path $PromptsRoot 'archgraph.instructions.md'
41
- Write-Host "[4/4] argo\rules\archgraph.instructions.md -> $ruleDest"
46
+ Write-Host "[5/6] argo\rules\archgraph.instructions.md -> $ruleDest"
42
47
  New-Item -ItemType Directory -Force -Path $PromptsRoot | Out-Null
43
48
  Copy-Item -Force -Path $ruleSrc -Destination $ruleDest
44
49
 
45
50
  $depsSrc = Join-Path $argoDir 'package.json'
46
51
  $depsDest = Join-Path $ArgoRoot 'package.json'
47
- Write-Host "[5/5] argo\package.json -> $depsDest"
52
+ Write-Host "[6/6] argo\package.json -> $depsDest"
48
53
  Copy-Item -Force -Path $depsSrc -Destination $depsDest
49
54
 
50
55
  if ($SkipDeps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
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": {
@@ -9,6 +9,7 @@
9
9
  "files": [
10
10
  "argo/scripts",
11
11
  "argo/schema",
12
+ "argo/defaults",
12
13
  "argo/skills/argo-init",
13
14
  "argo/rules",
14
15
  "argo/package.json",