archgraph-argo-beta 0.27.0-beta.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.
Files changed (85) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +107 -0
  3. package/argo/.env.example +170 -0
  4. package/argo/defaults/EA-model-template.qea +0 -0
  5. package/argo/defaults/design/KG/SystemArchitecture.json +128 -0
  6. package/argo/mcp-bridges/graph-mcp-stdio.js +98 -0
  7. package/argo/package.json +8 -0
  8. package/argo/plugins/argo-cost-collector.js +35 -0
  9. package/argo/plugins/argo-wakeup.js +29 -0
  10. package/argo/rules/archgraph.instructions.md +189 -0
  11. package/argo/schema/ImplementationToCodingHandoff.schema.json +252 -0
  12. package/argo/schema/ImplementationToIntentTraceProposal.schema.json +180 -0
  13. package/argo/schema/IntentToImplementationHandoff.schema.json +75 -0
  14. package/argo/schema/SystemArchitecture.schema.json +378 -0
  15. package/argo/schema/archimate3.2.md +7153 -0
  16. package/argo/schema/argob-rules.json +12229 -0
  17. package/argo/schema/argob.config.json +20 -0
  18. package/argo/scripts/ARCHITECTURE.md +58 -0
  19. package/argo/scripts/agentSearchDiagnose.js +407 -0
  20. package/argo/scripts/archimate32-rules.js +12301 -0
  21. package/argo/scripts/argo-mcp-server.js +952 -0
  22. package/argo/scripts/argo-paths.js +168 -0
  23. package/argo/scripts/argob-schema.js +574 -0
  24. package/argo/scripts/ea-qea-sync-lib.js +1014 -0
  25. package/argo/scripts/ea-qea-sync.js +110 -0
  26. package/argo/scripts/ensureArgoHarnessEnvironment.js +451 -0
  27. package/argo/scripts/external-graph-query.js +162 -0
  28. package/argo/scripts/generateArchitectureDiffPlantuml.js +466 -0
  29. package/argo/scripts/graph-rag/ARCHITECTURE.md +192 -0
  30. package/argo/scripts/graph-rag/agentCostLog.js +179 -0
  31. package/argo/scripts/graph-rag/canonicalProjectionAuthority.js +45 -0
  32. package/argo/scripts/graph-rag/defaultSemanticRetrieval.js +1244 -0
  33. package/argo/scripts/graph-rag/embeddingProviderProfile.js +89 -0
  34. package/argo/scripts/graph-rag/embeddingQualificationGate.js +59 -0
  35. package/argo/scripts/graph-rag/externalProductionConfig.js +74 -0
  36. package/argo/scripts/graph-rag/hybridRetrieval.js +114 -0
  37. package/argo/scripts/graph-rag/liveEmbeddingIndexGate.js +128 -0
  38. package/argo/scripts/graph-rag/liveEmbeddingNeo4jBoundary.js +137 -0
  39. package/argo/scripts/graph-rag/liveEmbeddingProviderClient.js +49 -0
  40. package/argo/scripts/graph-rag/liveEmbeddingProviderConfig.js +571 -0
  41. package/argo/scripts/graph-rag/mcpCrashDiagnostics.js +137 -0
  42. package/argo/scripts/graph-rag/mutationEmbeddingVectorLifecycle.js +1266 -0
  43. package/argo/scripts/graph-rag/neo4jNativeRetrieval.js +37 -0
  44. package/argo/scripts/graph-rag/productionGraphRagRuntime.js +1633 -0
  45. package/argo/scripts/graph-rag/rerankRetrieval.js +201 -0
  46. package/argo/scripts/graph-rag/semantic-persistence/ARCHITECTURE.md +51 -0
  47. package/argo/scripts/graph-rag/semantic-persistence/productionSemanticBackfill.js +342 -0
  48. package/argo/scripts/graph-rag/semantic-persistence/productionSemanticCheckpointStore.js +99 -0
  49. package/argo/scripts/graph-rag/semantic-persistence/productionSemanticNeo4jAdapter.js +186 -0
  50. package/argo/scripts/graph-rag/semantic-persistence/productionSemanticProjectionStore.js +171 -0
  51. package/argo/scripts/graph-rag/semanticAlignmentLock.js +76 -0
  52. package/argo/scripts/graph-rag/semanticAlignmentRunner.js +131 -0
  53. package/argo/scripts/graph-rag/semanticInitConfiguration.js +24 -0
  54. package/argo/scripts/graph-rag/semanticOperatorError.js +38 -0
  55. package/argo/scripts/graph-rag/semanticOperatorJourney.js +459 -0
  56. package/argo/scripts/graph-rag/semanticReadinessAttestationStore.js +398 -0
  57. package/argo/scripts/graph-rag/semanticRecordText.js +75 -0
  58. package/argo/scripts/graph-rag/systemMetadataCommandAdapter.js +269 -0
  59. package/argo/scripts/graph-semantics.js +266 -0
  60. package/argo/scripts/lossless-write-gate.js +500 -0
  61. package/argo/scripts/neo4j-system-architecture-store.js +1066 -0
  62. package/argo/scripts/repair-subdiagram-views.js +288 -0
  63. package/argo/scripts/repositoryArgoEnvironment.js +101 -0
  64. package/argo/scripts/runArchitectureTests.js +591 -0
  65. package/argo/scripts/semanticOperatorJourneyCli.js +91 -0
  66. package/argo/scripts/syncSystemArchitectureToNeo4j.js +67 -0
  67. package/argo/scripts/systemarchitecture-mcp-server.js +4508 -0
  68. package/argo/scripts/test-executors/_template.js +58 -0
  69. package/argo/scripts/test-executors/default.js +199 -0
  70. package/argo/scripts/validateStageHandoff.js +459 -0
  71. package/argo/scripts/validateSystemArchitecture.js +261 -0
  72. package/argo/scripts/validateTraceProposal.js +181 -0
  73. package/argo/scripts/validator-mcp-server.js +347 -0
  74. package/argo/skills/agent-search-diagnosis/SKILL.md +60 -0
  75. package/argo/skills/argo-init/SKILL.md +86 -0
  76. package/argo/skills/ea-human-reconcile/SKILL.md +40 -0
  77. package/bin/argo-deploy.js +12 -0
  78. package/cordis.patch.yml +6 -0
  79. package/dsh-argo-wakeup/index.js +17 -0
  80. package/dsh-argo-wakeup/package.json +1 -0
  81. package/dsh-argo-workspace/index.js +142 -0
  82. package/dsh-argo-workspace/package.json +1 -0
  83. package/install-argo.ps1 +1162 -0
  84. package/package.json +56 -0
  85. package/vendor/neo4j-driver-6.2.0.tgz +0 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # ArchGraph
2
+
3
+ An architecture-graph driven framework for Agentic Engineering.
4
+
5
+ ## What is this?
6
+
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.
9
+
10
+ It doubles as a **long-term memory for coding agents**: an ArchiMate 3.2 intent graph exposed through
11
+ a single read/write MCP interface. Memory is tiered — a compact working memory restored at session
12
+ start, a long-term memory recalled on demand — and writes are deduplicated, so the graph stays clean
13
+ and semantic recall stays precise. Reusable subgraphs can also be shared across projects through a
14
+ federated registry, and any read tool can take an optional <code>projectId</code> to query
15
+ **another project's graph** through the federation center — authorized, read-only, and by
16
+ reference (denied by default). See the [home page](https://archgraph.org/) for the full capability set.
17
+
18
+ ![ArchGraph core model — harness design and product design in one graph](docs/diagrams/core-model.svg)
19
+
20
+ ## Architecture
21
+
22
+ The global architecture (Layered Viewpoint) shows how the human, the coding agent, ARGO MCP, the
23
+ intent architecture graph, ArchiMate 3.2, and Enterprise Architect relate in graph-driven agentic
24
+ engineering:
25
+
26
+ ![Global architecture — Layered Viewpoint](docs/diagrams/global-architecture.svg)
27
+
28
+ Editable source: [`scripts/gen-diagrams.js`](scripts/gen-diagrams.js)
29
+
30
+ ## Supported Harnesses
31
+
32
+ ArchGraph deploys the ARGO toolchain to all major coding-agent environments:
33
+
34
+ | Harness | MCP Server | Skills | Rules / Instructions | Agents | Wakeup Gate |
35
+ |--------------------|:----------:|:------:|:--------------------:|:------:|:-----------:|
36
+ | GitHub Copilot | ✓ | ✓ | ✓ | ✓ | — |
37
+ | Cursor | ✓ | ✓ | ✓ | ✓ | — |
38
+ | OpenCode | ✓ | ✓ | ✓ | ✓ | ✓ |
39
+ | DeepSeek Harness | ✓ | ✓ | ✓ | ✓ | ✓ |
40
+ | OpenClaw | ✓ | ✓ | ✓ | — | ✓ |
41
+
42
+ A single `argo-deploy` registers the `argo` MCP server and installs all artifacts into each harness
43
+ automatically.
44
+
45
+ ## Install
46
+
47
+ ```powershell
48
+ npm install -g archgraph-argo
49
+ argo-deploy
50
+ ```
51
+
52
+ Done &mdash; the ARGO toolchain, skills, and rules are deployed, and the `argo` MCP server is registered automatically in **GitHub Copilot**, **Cursor**, **OpenCode**, **DeepSeek Harness** (dsh), and **OpenClaw**.
53
+
54
+ ### Prerequisites and configuration
55
+
56
+ Everything works out of the box except **semantic (Graph RAG) queries**, which need:
57
+
58
+ - **Neo4j graph database** — stores the structural projection of your architecture graph. During
59
+ `argo-deploy` you configure `ARGO_NEO4J_DATABASE_URL`, `ARGO_NEO4J_DATABASE_USERNAME`, and
60
+ `ARGO_NEO4J_DATABASE_PASSWORD` in `~/.argo/.env`.
61
+ - **Embedding / vector engine** — powers semantic Graph RAG retrieval. Configure
62
+ `ARGO_EMBEDDING_BASE_URL`, `ARGO_EMBEDDING_MODEL`, `ARGO_EMBEDDING_PROVIDER`,
63
+ `ARGO_EMBEDDING_MODEL_VERSION`, `ARGO_EMBEDDING_DIMENSIONS`, plus the API key `QWEN_KEY`.
64
+ It points at **any OpenAI-compatible embedding endpoint** — a cloud provider, or a self-hosted
65
+ server for offline / intranet / private deployments via `ARGO_EMBEDDING_PROFILE=openai-compatible`
66
+ (see the [self-hosted embedding guide](docs/self-hosted-embedding-deployment.md)).
67
+
68
+ Where do the values come from? The Neo4j credentials come from the Neo4j instance you own or
69
+ provision (URI, username, password). The embedding configuration and `QWEN_KEY` come from your
70
+ embedding provider's dashboard — for example Alibaba DashScope — or from a self-hosted
71
+ OpenAI-compatible server. `argo-deploy` walks you through the prompt (existing non-empty values in
72
+ `~/.argo/.env` are kept); you can also edit the file afterwards and re-run.
73
+
74
+ ## How to use
75
+
76
+ **Step 0 — initialize the workspace.** In a fresh project, ask your coding agent to run `argo init`
77
+ (the `initializeWorkspace` MCP call). It creates a starter `design/KG/SystemArchitecture.json` when
78
+ missing, performs the first JSON → Neo4j sync, initializes the semantic (Graph RAG) lifecycle, and
79
+ verifies the architecture. From then on, the intent graph is the source of truth for the project.
80
+
81
+ After installing, open your project and start a coding agent. It will:
82
+
83
+ 1. locate the architecture element behind the task before changing anything,
84
+ 2. arm itself with that element's Skills and Rules,
85
+ 3. work test-first (GIVEN-WHEN-THEN), and trace every commit back to the graph,
86
+ 4. reuse an existing element, relationship, or view instead of creating a duplicate — the write path
87
+ deduplicates by identity and flags a semantically near element of the same type.
88
+
89
+ The intent architecture graph — modelled in **ArchiMate 3.2** — is the single source of truth.
90
+
91
+ ## Community
92
+
93
+ ArchGraph runs on open co-building. Join the community hub to share, browse and reuse **architecture
94
+ subgraphs** across projects, and follow the governance & contribution guides:
95
+
96
+ - **Community site** — https://argo.derekworkspacev5.com/archgraph/ (subgraph library, docs, blog)
97
+ - **graph-wiki repository** — https://github.com/derekhu0002/graph-wiki (graph-asset home: contribute
98
+ a subgraph from your project, or pull one back to reuse)
99
+
100
+ Sharing is **federated**: each project keeps its own graph sovereign and publishes subgraphs to a
101
+ registry, where other members register, discover, and read opened content **by reference** —
102
+ register, discover, authorize, read. Access is **denied by default**, and nothing is copied or merged.
103
+ Browse the [federation members](https://argo.derekworkspacev5.com/archgraph/federation).
104
+
105
+ ## License
106
+
107
+ [Apache License 2.0](LICENSE)
@@ -0,0 +1,170 @@
1
+ # =============================================================================
2
+ # ArchGraph (archgraph-argo) environment configuration — EXAMPLE.
3
+ #
4
+ # Copy this file to the live env file and fill in real values:
5
+ # Windows %USERPROFILE%\.argo\.env
6
+ # Linux/macOS ~/.argo/.env
7
+ # The live file is git-ignored and MUST stay untracked (never commit it);
8
+ # this example is committed and contains no secrets.
9
+ #
10
+ # PART 1 keys are the ONLY keys accepted inside the .env file (any unknown key
11
+ # makes the secret-file preflight reject the whole file). PART 2 keys are
12
+ # host/process-level only — set them in the host/MCP launch config or shell, NOT
13
+ # here. Empty values below are placeholders.
14
+ # =============================================================================
15
+
16
+
17
+ # -----------------------------------------------------------------------------
18
+ # PART 1 — .env file keys
19
+ # -----------------------------------------------------------------------------
20
+
21
+ # --- Embedding provider (required) — powers vector semantic retrieval -------
22
+ # Provider profile: "approved" (default) = the human-approved cloud profile
23
+ # below; "openai-compatible" = a self-hosted OpenAI-compatible endpoint
24
+ # (intranet/offline) whose URL/model/label/dimension are read verbatim.
25
+ ARGO_EMBEDDING_PROFILE=
26
+ # OpenAI-compatible embedding endpoint base URL (no trailing slash).
27
+ ARGO_EMBEDDING_BASE_URL=
28
+ # Embedding model id (e.g. qwen3.7-text-embedding).
29
+ ARGO_EMBEDDING_MODEL=
30
+ # Provider label recorded in evidence; also the rerank fallback provider.
31
+ ARGO_EMBEDDING_PROVIDER=
32
+ # Model version / qualification label (recorded evidence only).
33
+ ARGO_EMBEDDING_MODEL_VERSION=
34
+ # Embedding vector dimension; must match the model and the vector index
35
+ # (current profiles: 1536).
36
+ ARGO_EMBEDDING_DIMENSIONS=
37
+ # Query-side instruction prefix for instruction-tuned embedding models (e.g.
38
+ # gte-Qwen2: "Instruct: <task>\nQuery: "). Empty = no prefix. Documents are
39
+ # never prefixed; only the query side is.
40
+ ARGO_EMBEDDING_QUERY_INSTRUCTION=
41
+ # Optional embedding API key. SECRET: overrides QWEN_KEY as the Bearer token for
42
+ # the embeddings call when set (useful for a self-hosted endpoint). Leave empty
43
+ # to use QWEN_KEY.
44
+ ARGO_EMBEDDING_API_KEY=
45
+
46
+ # --- Neo4j (required) — structural projection + vector/full-text store ------
47
+ # Neo4j connection URI (e.g. neo4j://127.0.0.1:7687).
48
+ ARGO_NEO4J_DATABASE_URL=
49
+ # Neo4j username.
50
+ ARGO_NEO4J_DATABASE_USERNAME=
51
+ # Neo4j password. SECRET: value must come from the untracked
52
+ # .env (or direct process injection) only — never commit it.
53
+ ARGO_NEO4J_DATABASE_PASSWORD=
54
+ # Optional: override the Neo4j database name. Default = sanitized repository
55
+ # folder name (e.g. repo "archgraph" -> database "archgraph").
56
+ ARGO_NEO4J_DATABASE=
57
+
58
+ # --- Secrets (required) ------------------------------------------------------
59
+ # API key for the embedding endpoint above. SECRET; also the fallback key for
60
+ # the reranker when ARGO_RERANK_API_KEY is not set. Never commit it.
61
+ QWEN_KEY=
62
+
63
+ # --- Semantic retrieval tuning (optional; safe defaults shown) --------------
64
+ # Similarity threshold, memory purposes (recall-oriented). Default 0.55.
65
+ ARGO_SEMANTIC_MEMORY_THRESHOLD=
66
+ # Memory threshold override for the Element channel. Default 0.55.
67
+ ARGO_SEMANTIC_MEMORY_THRESHOLD_ELEMENT=
68
+ # Memory threshold override for the ArchitectureRelationship channel. Default 0.55.
69
+ ARGO_SEMANTIC_MEMORY_THRESHOLD_RELATIONSHIP=
70
+ # Memory threshold override for the View channel. Default 0.55.
71
+ ARGO_SEMANTIC_MEMORY_THRESHOLD_VIEW=
72
+ # Similarity threshold, audit purpose (precision-oriented). Default 0.8.
73
+ ARGO_SEMANTIC_AUDIT_THRESHOLD=
74
+ # Audit threshold override for the Element channel. Default 0.8.
75
+ ARGO_SEMANTIC_AUDIT_THRESHOLD_ELEMENT=
76
+ # Audit threshold override for the ArchitectureRelationship channel. Default 0.8.
77
+ ARGO_SEMANTIC_AUDIT_THRESHOLD_RELATIONSHIP=
78
+ # Audit threshold override for the View channel. Default 0.8.
79
+ ARGO_SEMANTIC_AUDIT_THRESHOLD_VIEW=
80
+ # Bound on returned candidates per retrieval. Default 8.
81
+ ARGO_SEMANTIC_TOP_K=
82
+
83
+ # --- Hybrid retrieval (vector + lexical BM25 via RRF; optional) -------------
84
+ # Master switch. "1" enables hybrid fusion; unset/"0" = vector-only (default off).
85
+ ARGO_SEMANTIC_HYBRID=
86
+ # Weight of the vector channel in the RRF fusion. Default 3.
87
+ ARGO_SEMANTIC_HYBRID_VECTOR_WEIGHT=
88
+ # Weight of the lexical (full-text) channel in the RRF fusion. Default 1.
89
+ ARGO_SEMANTIC_HYBRID_LEXICAL_WEIGHT=
90
+ # RRF smoothing constant k. Default 60.
91
+ ARGO_SEMANTIC_HYBRID_RRF_K=
92
+ # Candidate pool size pulled per channel before fusion. Default 16.
93
+ ARGO_SEMANTIC_HYBRID_TOP_K=
94
+
95
+ # --- LLM rerank (second-stage reordering; optional) -------------------------
96
+ # Master switch. "1" enables rerank; unset/"0" = off (default off). Fail-open:
97
+ # any error/timeout keeps the original order.
98
+ ARGO_SEMANTIC_RERANK=
99
+ # Rerank model when using the embedding provider fallback. Default qwen-turbo.
100
+ ARGO_SEMANTIC_RERANK_MODEL=
101
+ # Candidate pool size offered to the reranker. Default 20.
102
+ ARGO_SEMANTIC_RERANK_POOL=
103
+ # Max ids the reranker may return. Default 8.
104
+ ARGO_SEMANTIC_RERANK_RETURN=
105
+ # Per-request rerank timeout in ms (AbortController). Default 3500.
106
+ ARGO_SEMANTIC_RERANK_TIMEOUT_MS=
107
+ # Dedicated rerank provider (optional). When unset, rerank falls back to the
108
+ # embedding provider above. Use these to point rerank at another provider/model
109
+ # (e.g. DeepSeek: base https://api.deepseek.com, model deepseek-flash).
110
+ ARGO_RERANK_BASE_URL=
111
+ # Dedicated rerank API key. SECRET. Falls back to QWEN_KEY when unset.
112
+ ARGO_RERANK_API_KEY=
113
+ # Dedicated rerank provider label (informational; defaults to the embedding provider label).
114
+ ARGO_RERANK_PROVIDER=
115
+ # Dedicated rerank model id (overrides ARGO_SEMANTIC_RERANK_MODEL).
116
+ ARGO_RERANK_MODEL=
117
+ # Disable the rerank model's hidden "thinking"/reasoning (reasoning models spend
118
+ # 6-12s per call for a listwise ranking with no accuracy gain). Default 1 =
119
+ # disabled; set 0 to send nothing. Applies to every provider so a model swap
120
+ # keeps the fast path. If a provider rejects the fragment it is retried without.
121
+ ARGO_RERANK_DISABLE_THINKING=
122
+ # Exact JSON body fragment merged into the rerank request to disable thinking
123
+ # (default {"thinking":{"type":"disabled"}}). Override for another model/provider
124
+ # that uses a different field, e.g. {"reasoning_effort":"none"} or
125
+ # {"enable_thinking":false}.
126
+ ARGO_RERANK_THINKING_PARAM=
127
+
128
+ # --- Live end-to-end opt-ins (optional; normally unset) ---------------------
129
+ # "1" allows the live embedding-provider E2E to hit the real network.
130
+ ARGO_LIVE_PROVIDER_E2E=
131
+ # "1" allows the live W3.1 mutation-vector E2E to hit the real network.
132
+ ARGO_W31_LIVE_MUTATION_VECTOR_E2E=
133
+
134
+
135
+ # -----------------------------------------------------------------------------
136
+ # PART 2 — host / process-level only (do NOT put these in .env)
137
+ # Set in the host or MCP launch configuration (mcp.json / opencode.json env,
138
+ # dsh plugin, or the shell), never in the .env file.
139
+ # -----------------------------------------------------------------------------
140
+ # Point at a non-default env file path.
141
+ # ARGO_ENV_FILE=
142
+ # Pin the workspace/repository root the MCP server serves.
143
+ # ARGO_REPO_ROOT=
144
+ # Explicit schema-bundle directory (highest precedence): overrides both the
145
+ # repository's own <workspace>/.argo/schema bundle and the default ArgoBument
146
+ # bundle. Must contain SystemArchitecture.schema.json.
147
+ # ARGO_SCHEMA_DIR=
148
+ # Actor element type the wakeup gate looks up when a workspace schema renames
149
+ # it. Default: Business Actor.
150
+ # ARGO_ACTOR_ELEMENT_TYPE=
151
+ # Path to the Enterprise Architect model file (.qea) to project to/from.
152
+ # ARGO_EA_QEA=
153
+ # Semicolon-separated roots for multi-workspace hosts (DSH plugin).
154
+ # ARGO_WORKSPACE_ROOTS=
155
+ # Explicit path to the argo MCP server entry script (DSH plugin).
156
+ # ARGO_SERVER_PATH=
157
+ # URL of the graph-mcp HTTP bridge.
158
+ # GRAPH_MCP_URL=
159
+ # "1" enables verbose EA <-> .qea sync debug logging.
160
+ # EA_QEA_DEBUG=
161
+ # Architecture test runner timeout in ms.
162
+ # ARGO_TEST_TIMEOUT_MS=
163
+ # "1" prints the full mutation response for debugging.
164
+ # ARGO_MCP_MUTATION_RESPONSE_DEBUG=
165
+ # "0" disables the pre-write semantic dedup advisory (default: enabled).
166
+ # ARGO_MCP_SEMANTIC_DEDUP=
167
+ # Similarity threshold for the semantic dedup advisory. Default 0.85.
168
+ # ARGO_MCP_SEMANTIC_DEDUP_THRESHOLD=
169
+ # Alias of ARGO_MCP_SEMANTIC_DEDUP_THRESHOLD (takes precedence when set).
170
+ # ARGO_SEMANTIC_DEDUP_THRESHOLD=
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "System",
3
+ "description": "Exported from EA package System",
4
+ "elements": [
5
+ {
6
+ "id": "1240",
7
+ "name": "Application Cooperation Viewpoint",
8
+ "alias": "1211",
9
+ "type": "Grouping",
10
+ "subdiagram_views": [
11
+ {
12
+ "view_id": "169",
13
+ "view_name": "Application Cooperation"
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "id": "1249",
19
+ "name": "Implementation and Migration Viewpoint",
20
+ "alias": "1211",
21
+ "type": "Grouping",
22
+ "subdiagram_views": [
23
+ {
24
+ "view_id": "176",
25
+ "view_name": "AgentCapabilities"
26
+ },
27
+ {
28
+ "view_id": "174",
29
+ "view_name": "Implementation and Migration"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "id": "project-manager-001",
35
+ "name": "项目经理",
36
+ "type": "Business Actor",
37
+ "description": "新项目的默认主 Business Actor:任何由框架默认模板初始化的项目,其意图图中都内置本『项目经理』角色,作为该项目默认的负责人与主 Agent 身份。当人类伙伴未指定具体角色时,默认以项目经理身份进行对话、规划与决策,并按需把工作委派给项目内的其他 Business Actor。",
38
+ "subdiagram_views": [
39
+ {
40
+ "view_id": "project-manager-001-wm-001",
41
+ "view_name": "项目经理工作记忆"
42
+ },
43
+ {
44
+ "view_id": "project-manager-001-ltm-001",
45
+ "view_name": "项目经理长期记忆"
46
+ },
47
+ {
48
+ "view_id": "project-manager-001-archive-001",
49
+ "view_name": "项目经理档案"
50
+ }
51
+ ]
52
+ }
53
+ ],
54
+ "relationships": [
55
+ {
56
+ "id": "1161",
57
+ "statement": "Implementation and Migration Viewpoint --(Association)--> Application Cooperation Viewpoint",
58
+ "name": "Association",
59
+ "type": "Association",
60
+ "source_id": "1249",
61
+ "target_id": "1240",
62
+ "source_name": "Implementation and Migration Viewpoint",
63
+ "target_name": "Application Cooperation Viewpoint"
64
+ }
65
+ ],
66
+ "views": [
67
+ {
68
+ "view_id": "176",
69
+ "view_name": "AgentCapabilities",
70
+ "parent_element_id": "1249",
71
+ "parent_element_name": "Implementation and Migration Viewpoint",
72
+ "included_elements": [],
73
+ "included_relationships": []
74
+ },
75
+ {
76
+ "view_id": "174",
77
+ "view_name": "Implementation and Migration",
78
+ "parent_element_id": "1249",
79
+ "parent_element_name": "Implementation and Migration Viewpoint",
80
+ "included_elements": [],
81
+ "included_relationships": []
82
+ },
83
+ {
84
+ "view_id": "169",
85
+ "view_name": "Application Cooperation",
86
+ "parent_element_id": "1240",
87
+ "parent_element_name": "Application Cooperation Viewpoint",
88
+ "included_elements": [],
89
+ "included_relationships": []
90
+ },
91
+ {
92
+ "view_id": "project-manager-001-wm-001",
93
+ "view_name": "项目经理工作记忆",
94
+ "parent_element_id": "project-manager-001",
95
+ "parent_element_name": "项目经理",
96
+ "included_elements": [],
97
+ "included_relationships": []
98
+ },
99
+ {
100
+ "view_id": "project-manager-001-ltm-001",
101
+ "view_name": "项目经理长期记忆",
102
+ "parent_element_id": "project-manager-001",
103
+ "parent_element_name": "项目经理",
104
+ "included_elements": [],
105
+ "included_relationships": []
106
+ },
107
+ {
108
+ "view_id": "project-manager-001-archive-001",
109
+ "view_name": "项目经理档案",
110
+ "parent_element_id": "project-manager-001",
111
+ "parent_element_name": "项目经理",
112
+ "included_elements": [],
113
+ "included_relationships": []
114
+ },
115
+ {
116
+ "view_id": "170",
117
+ "view_name": "SystemArchitecture",
118
+ "included_elements": [
119
+ "1249",
120
+ "1240",
121
+ "project-manager-001"
122
+ ],
123
+ "included_relationships": [
124
+ "1161"
125
+ ]
126
+ }
127
+ ]
128
+ }