archharness 0.3.2__tar.gz

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 (81) hide show
  1. archharness-0.3.2/LICENSE +21 -0
  2. archharness-0.3.2/MANIFEST.in +6 -0
  3. archharness-0.3.2/PKG-INFO +447 -0
  4. archharness-0.3.2/README.md +406 -0
  5. archharness-0.3.2/archharness/__init__.py +3 -0
  6. archharness-0.3.2/archharness/__main__.py +3 -0
  7. archharness-0.3.2/archharness/cli.py +153 -0
  8. archharness-0.3.2/archharness/data/config.example.yaml +98 -0
  9. archharness-0.3.2/archharness/data/skills/arch-design/SKILL.md +106 -0
  10. archharness-0.3.2/archharness/data/skills/arch-diagram/SKILL.md +82 -0
  11. archharness-0.3.2/archharness/data/skills/arch-enforce/SKILL.md +89 -0
  12. archharness-0.3.2/archharness/data/skills/arch-optimize/SKILL.md +128 -0
  13. archharness-0.3.2/archharness/data/skills/arch-report/SKILL.md +129 -0
  14. archharness-0.3.2/archharness/data/skills/arch-req-from-api/SKILL.md +123 -0
  15. archharness-0.3.2/archharness/data/skills/arch-req-from-diagram/SKILL.md +101 -0
  16. archharness-0.3.2/archharness/data/skills/arch-req-from-doc/SKILL.md +91 -0
  17. archharness-0.3.2/archharness/data/skills/arch-req-merge/SKILL.md +90 -0
  18. archharness-0.3.2/archharness/data/skills/arch-requirements/REQ-example.md +145 -0
  19. archharness-0.3.2/archharness/data/skills/arch-requirements/SKILL.md +368 -0
  20. archharness-0.3.2/archharness/data/skills/arch-requirements/req-example.yaml +315 -0
  21. archharness-0.3.2/archharness/data/skills/arch-review/SKILL.md +123 -0
  22. archharness-0.3.2/archharness/data/skills/arch-security/SKILL.md +100 -0
  23. archharness-0.3.2/archharness/data/skills/arch-validate/SKILL.md +195 -0
  24. archharness-0.3.2/archharness/data/skills/arch-validate/rules/accuracy-rules.yaml +314 -0
  25. archharness-0.3.2/archharness/data/skills/arch-validate/rules/compliance/terminology.yaml +188 -0
  26. archharness-0.3.2/archharness/data/skills/arch-validate/rules/diagram-rules.yaml +154 -0
  27. archharness-0.3.2/archharness/data/skills/arch-validate/rules/interaction-rules.yaml +178 -0
  28. archharness-0.3.2/archharness/data/skills/arch-validate/rules/platform-rules.yaml +344 -0
  29. archharness-0.3.2/archharness/data/skills/arch-validate/rules/security-rules.yaml +232 -0
  30. archharness-0.3.2/archharness/data/skills/arch-workflow/SKILL.md +66 -0
  31. archharness-0.3.2/archharness/data/standards/arch-gate-policy.yaml +27 -0
  32. archharness-0.3.2/archharness/data/standards/aws-standard.yaml +166 -0
  33. archharness-0.3.2/archharness/data/standards/azure-standard.yaml +208 -0
  34. archharness-0.3.2/archharness/data/standards/ci-gate-spec.yaml +132 -0
  35. archharness-0.3.2/archharness/data/standards/diagram-style.yaml +321 -0
  36. archharness-0.3.2/archharness/data/standards/eval-weights.yaml +107 -0
  37. archharness-0.3.2/archharness/data/standards/private-cloud-standard.yaml +190 -0
  38. archharness-0.3.2/archharness/data/standards/workflow.yaml +70 -0
  39. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/DIAGRAM_GENERATION_ANALYSIS.md +135 -0
  40. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/README.md +208 -0
  41. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/arch-schema-reference.yaml +191 -0
  42. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/arch_diagram_gen.py +200 -0
  43. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/d2_generator.py +335 -0
  44. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/example_arch.yaml +94 -0
  45. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/example_output.d2 +315 -0
  46. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/example_output.drawio +226 -0
  47. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/example_output.png +0 -0
  48. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/example_output.puml +110 -0
  49. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/generator.py +357 -0
  50. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/layout.py +235 -0
  51. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/plantuml_generator.py +289 -0
  52. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/png_renderer.py +404 -0
  53. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/styles.py +169 -0
  54. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/CATALOG.yaml +222 -0
  55. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/aws-hybrid.yaml +294 -0
  56. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/azure-hub-spoke.yaml +307 -0
  57. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/data-analytics.yaml +269 -0
  58. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/microsoft-365.yaml +285 -0
  59. archharness-0.3.2/archharness/data/tools/arch-diagram-gen/templates/private-cloud.yaml +245 -0
  60. archharness-0.3.2/archharness/data/tools/arch-req-readers/README.md +125 -0
  61. archharness-0.3.2/archharness/data/tools/arch-req-readers/from_api.py +406 -0
  62. archharness-0.3.2/archharness/data/tools/arch-req-readers/from_diagram.py +676 -0
  63. archharness-0.3.2/archharness/data/tools/arch-req-readers/from_document.py +373 -0
  64. archharness-0.3.2/archharness/data/tools/arch-req-readers/merger.py +525 -0
  65. archharness-0.3.2/archharness/data/tools/arch-req-readers/normalizer.py +179 -0
  66. archharness-0.3.2/archharness/data/tools/arch-req-readers/req_reader.py +188 -0
  67. archharness-0.3.2/archharness/data/tools/config_loader.py +250 -0
  68. archharness-0.3.2/archharness/data/tools/yaml_validate.py +361 -0
  69. archharness-0.3.2/archharness/paths.py +51 -0
  70. archharness-0.3.2/archharness/tool_runners.py +62 -0
  71. archharness-0.3.2/archharness/workspace.py +246 -0
  72. archharness-0.3.2/archharness.egg-info/PKG-INFO +447 -0
  73. archharness-0.3.2/archharness.egg-info/SOURCES.txt +79 -0
  74. archharness-0.3.2/archharness.egg-info/dependency_links.txt +1 -0
  75. archharness-0.3.2/archharness.egg-info/entry_points.txt +2 -0
  76. archharness-0.3.2/archharness.egg-info/requires.txt +19 -0
  77. archharness-0.3.2/archharness.egg-info/top_level.txt +1 -0
  78. archharness-0.3.2/pyproject.toml +50 -0
  79. archharness-0.3.2/setup.cfg +4 -0
  80. archharness-0.3.2/tests/test_cli.py +40 -0
  81. archharness-0.3.2/tests/test_workspace.py +44 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ArchHarness contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include archharness/data *
5
+ global-exclude *.py[cod]
6
+ global-exclude __pycache__
@@ -0,0 +1,447 @@
1
+ Metadata-Version: 2.4
2
+ Name: archharness
3
+ Version: 0.3.2
4
+ Summary: Enterprise architecture skill pack and multi-project workspace tools
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/axisrobo/ea-harness
7
+ Project-URL: Repository, https://github.com/axisrobo/ea-harness
8
+ Project-URL: Releases, https://github.com/axisrobo/ea-harness/releases
9
+ Project-URL: Documentation, https://github.com/axisrobo/ea-harness#readme
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: System :: Networking
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: PyYAML<7,>=6
26
+ Provides-Extra: diagram
27
+ Requires-Dist: matplotlib>=3.7; extra == "diagram"
28
+ Provides-Extra: documents
29
+ Requires-Dist: pdfplumber>=0.10; extra == "documents"
30
+ Requires-Dist: python-docx>=1.1; extra == "documents"
31
+ Provides-Extra: llm
32
+ Requires-Dist: anthropic>=0.40; extra == "llm"
33
+ Requires-Dist: openai>=1.0; extra == "llm"
34
+ Provides-Extra: all
35
+ Requires-Dist: matplotlib>=3.7; extra == "all"
36
+ Requires-Dist: pdfplumber>=0.10; extra == "all"
37
+ Requires-Dist: python-docx>=1.1; extra == "all"
38
+ Requires-Dist: anthropic>=0.40; extra == "all"
39
+ Requires-Dist: openai>=1.0; extra == "all"
40
+ Dynamic: license-file
41
+
42
+ # ArchHarness
43
+
44
+ Enterprise architecture design and validation skill pack for **Claude Code**, **OpenCode**,
45
+ **Codex**, **GitHub Copilot**, and **Cursor**.
46
+
47
+ ArchHarness turns your AI coding assistant into a team of architecture specialists —
48
+ a requirements analyst, a senior architect, a paranoid security auditor, a committee reviewer,
49
+ and a technical writer — each invocable on demand with a single command.
50
+
51
+ > **Not yet another README-only repo.** `archharness` ships a real CLI
52
+ > (`python -m archharness`), a multi-project workspace layout, and platform skills that
53
+ > load enterprise values from a single config file.
54
+
55
+ ## What it does
56
+
57
+ | Agent / Skill | Claude Code | OpenCode | Role |
58
+ |---|---|---|---|
59
+ | arch-workflow | `/arch-workflow` | `@arch-workflow` | Pipeline gatekeeper — enforces stage order; BLOCK stops pipeline |
60
+ | arch-requirements | `/arch-requirements` | `@arch-requirements` | Structured interview → REQ.md + req.yaml |
61
+ | arch-req-from-diagram | `/arch-req-from-diagram` | `@arch-req-from-diagram` | draw.io / PNG → partial req.yaml |
62
+ | arch-req-from-doc | `/arch-req-from-doc` | `@arch-req-from-doc` | PDF / DOCX / MD → partial req.yaml |
63
+ | arch-req-from-api | `/arch-req-from-api` | `@arch-req-from-api` | CMDB / ServiceNow / CSV → partial req.yaml |
64
+ | arch-req-merge | `/arch-req-merge` | `@arch-req-merge` | Merge partials, detect conflicts, gap report |
65
+ | arch-design | `/arch-design` | `@arch-design` | Requirements → architecture YAML + draw.io guidance |
66
+ | arch-diagram | `/arch-diagram` | `@arch-diagram` | Architecture YAML → draw.io XML + PNG |
67
+ | arch-validate | `/arch-validate` | `@arch-validate` | Diagram image → scored JSON report (6 dimensions) |
68
+ | arch-enforce | `/arch-enforce` | `@arch-enforce` | CI enforcement gate — PASS / WARN / BLOCK with exit code |
69
+ | arch-security | `/arch-security` | `@arch-security` | Auth / credentials / network boundary deep-dive |
70
+ | arch-review | `/arch-review` | `@arch-review` | Committee gate: APPROVED / CONDITIONS / REJECTED |
71
+ | arch-optimize | `/arch-optimize` | `@arch-optimize` | Prioritized fix backlog (P0/P1/P2/P3) |
72
+ | arch-report | `/arch-report` | `@arch-report` | Confluence page / executive summary / risk brief |
73
+
74
+ ## Workflow
75
+
76
+ ```
77
+ Requirements → arch-design → draw in draw.io → arch-validate
78
+
79
+ arch-enforce gate
80
+ PASS / WARN / BLOCK
81
+ │ if PASS/WARN
82
+
83
+ arch-security arch-review
84
+
85
+ arch-optimize
86
+
87
+ arch-report
88
+ ```
89
+
90
+ **The pipeline is mandatory and gated by artifacts.** The order and required
91
+ input/output files are defined in [`standards/workflow.yaml`](./standards/workflow.yaml).
92
+ The `arch-workflow` gatekeeper checks that every required artifact of the next
93
+ stage exists (and that the enforce gate recorded PASS or WARN) before the stage
94
+ starts. A BLOCK decision stops the pipeline until findings are fixed and
95
+ validation is re-run. Never skip a stage or fabricate predecessor outputs;
96
+ invoke `@arch-workflow status` / `@arch-workflow can <stage>` when in doubt.
97
+
98
+ ## Setup
99
+
100
+ ### 1. Clone
101
+
102
+ ```bash
103
+ git clone https://github.com/axisrobo/ea-harness.git
104
+ cd ea-harness
105
+ ```
106
+
107
+ ### 2. Configure the organisation profile
108
+
109
+ Edit **`config.yaml`** at the repository root to match your organisation's
110
+ infrastructure (DC names, platform names, classification prefix). Skills and
111
+ LLM rules load these values at runtime.
112
+
113
+ ```yaml
114
+ company:
115
+ name: "Acme Corp"
116
+
117
+ datacenters:
118
+ - id: "dc-primary"
119
+ aliases: ["Primary DC", "Tokyo DC"]
120
+ location: { city: "Tokyo", country: "JP" }
121
+ zones: ["DMZ", "App Zone", "DB Zone"]
122
+
123
+ platforms:
124
+ api_gateway: "Kong API Gateway" # or WSO2, AWS API GW, Azure APIM…
125
+ message_bus: "RabbitMQ" # or Kafka, Azure Service Bus…
126
+ k8s_platform: "Rancher"
127
+ integration_platforms:
128
+ - "Kong API Gateway"
129
+ - "RabbitMQ"
130
+ - "SFTP/MFT"
131
+ ```
132
+
133
+ > If you manage more than one architecture project, put these company values
134
+ > in `config.yaml` once and create **isolated projects** (next step). Per-project
135
+ > inputs and outputs live under `projects/<id>/`.
136
+
137
+ ### 3. Create a workspace and a project
138
+
139
+ One workspace can hold many architecture projects. Each project has its own
140
+ `input/`, `working/`, and `output/` trees so files never bleed between projects.
141
+
142
+ ```bash
143
+ # POSIX / macOS / Linux
144
+ python -m archharness init-workspace .
145
+ python -m archharness init-project payments --name "Payments Platform" --default
146
+ python -m archharness list-projects
147
+ ```
148
+
149
+ ```powershell
150
+ # Windows PowerShell
151
+ python -m archharness init-workspace .
152
+ python -m archharness init-project payments --name "Payments Platform" --default
153
+ python -m archharness list-projects
154
+ ```
155
+
156
+ This creates:
157
+
158
+ ```text
159
+ projects/payments/
160
+ ├─ project.yaml # id, name, platform, data classification
161
+ ├─ input/ # documents, diagrams, api exports, requirements
162
+ ├─ working/ # intermediate files
163
+ └─ output/ # requirements, designs, diagrams, validation, reports
164
+ ```
165
+
166
+ `project.yaml` and all generated files are git-ignored — only `project.yaml` and
167
+ `README.md` are tracked when you choose to commit them.
168
+
169
+ When you work inside a project directory, tools and skills auto-detect the active
170
+ project (`--project` also works from anywhere in the workspace).
171
+
172
+ ### 4. Install Python dependencies
173
+
174
+ ```bash
175
+ # POSIX / macOS / Linux
176
+ ./install.sh
177
+
178
+ # Windows PowerShell
179
+ .\install.ps1
180
+ ```
181
+
182
+ Or manually:
183
+
184
+ ```bash
185
+ pip install -e ".[all]"
186
+ python -m archharness init-workspace . # only if not created above
187
+ python -m archharness doctor # verify the install
188
+ ```
189
+
190
+ The installer registers skills with your AI tool, creates a workspace when one
191
+ is missing, and runs `doctor`. Add `ARCHHARNESS_HOME=/path/to/ea-harness` to
192
+ your environment if you ever run tools from a different working directory.
193
+
194
+ ### 5. Open in your AI coding tool
195
+
196
+ **Claude Code**
197
+ ```bash
198
+ claude .
199
+ ```
200
+ Skills under `.claude/skills/` register as `/arch-*` slash commands.
201
+
202
+ **OpenCode**
203
+ ```bash
204
+ opencode .
205
+ ```
206
+ Agents under `.opencode/agents/` register as `@arch-*` agents.
207
+
208
+ **Codex / GitHub Copilot / Cursor**
209
+ Point the tool at this repository root. `AGENTS.md` is read by all three;
210
+ Codex discovers skills under `.agents/skills/`; GitHub Copilot discovers the
211
+ `@arch-*` custom agents under `.github/agents/`; Cursor builds also read
212
+ `.claude/skills/`.
213
+
214
+ > **Tip:** working directory should be the repository root (or a project
215
+ > directory) so skills, tools, and `config.yaml` are found automatically.
216
+
217
+ ### Where each tool discovers ArchHarness
218
+
219
+ | Tool | Project rules | Skills / agents | Invocation |
220
+ |------|---------------|-----------------|------------|
221
+ | Claude Code | `CLAUDE.md` | `.claude/skills/` | `/arch-validate`, `/arch-design`, … |
222
+ | OpenCode | `AGENTS.md` | `.opencode/agents/` | `@arch-validate`, `@arch-design`, … |
223
+ | Codex | `AGENTS.md` | `.agents/skills/` | skill selector on `.agents/skills/` |
224
+ | GitHub Copilot | `AGENTS.md` | `.github/agents/` | `@arch-validate`, `@arch-design`, … |
225
+ | Cursor | `AGENTS.md` | `.claude/skills/` (supported builds) | `/skills` |
226
+
227
+ `.agents/skills/` is a generated mirror of `.claude/skills/`. Update it with
228
+ `python scripts/sync_agents_skills.py` after editing any skill; CI enforces
229
+ the mirror stays in sync (`scripts/check_repo.py` validates the whole pack).
230
+
231
+ ### Can users install from the chat window?
232
+
233
+ **Claude Code — yes, via the plugin marketplace.** In the Claude Code chat window:
234
+
235
+ ```
236
+ /plugin marketplace add axisrobo/ea-harness
237
+ /plugin install archharness@archharness-marketplace
238
+ /reload-plugins
239
+ ```
240
+
241
+ Plugin skills are namespaced as `/archharness:arch-validate`,
242
+ `/archharness:arch-design`, `/archharness:arch-workflow`, etc. (the plugin
243
+ caches a copy of the skills). For shared resources (`standards/`, `tools/`,
244
+ `config.yaml`) the skills resolve through the installed package or a checkout —
245
+ so run `pip install archharness[all]` (or set `ARCHHARNESS_HOME`) once.
246
+
247
+ **Every other tool**: open this repository as the working directory
248
+ (`claude .`, `opencode .`, `codex`, or point Copilot/Cursor at it). Skills,
249
+ agents, and `AGENTS.md` are then discovered automatically and stay able to
250
+ reach `tools/`, `standards/`, and `config.yaml`.
251
+
252
+ **Installers** (`install.ps1` / `install.sh`) prepare a fresh clone: they
253
+ install the Python package, initialise the workspace, and run `doctor`.
254
+
255
+ ### Command-line reference
256
+
257
+ | Command | Purpose |
258
+ |---|---|
259
+ | `python -m archharness --version` | Show the installed version |
260
+ | `python -m archharness root` | Print the resource root (config.yaml + tools/) |
261
+ | `python -m archharness doctor` | Self-check installation, workspace, and project |
262
+ | `python -m archharness init-workspace .` | Create the workspace metadata |
263
+ | `python -m archharness init-project <id>` | Scaffold an isolated project |
264
+ | `python -m archharness diagram -i arch.yaml` | Run the diagram generator (draw.io/PNG/D2/PlantUML) |
265
+ | `python -m archharness req --doc brief.md` | Run the requirements readers + merger |
266
+ | `python -m archharness validate-yaml config.yaml` | YAML syntax gate (CI fail-closed check) |
267
+
268
+ `diagram`, `req`, and `validate-yaml` forward their flags to the same Python
269
+ tools under `tools/`, so both invocation styles are equivalent:
270
+
271
+ ```bash
272
+ python tools/arch-diagram-gen/arch_diagram_gen.py -i arch.yaml
273
+ python -m archharness diagram -i arch.yaml
274
+ ```
275
+
276
+ Run a tool from inside `projects/<id>/` to target that project automatically;
277
+ pass `--project <id>` to target one from anywhere.
278
+
279
+ **Self-contained install (no checkout needed).** `pip install archharness[all]`
280
+ ships `tools/`, `standards/`, and the skill tree inside the package, so
281
+ `python -m archharness root` returns a bundled resource root and the CLI tools
282
+ work from any working directory:
283
+
284
+ ```bash
285
+ pip install "archharness[all]" # PyPI (once published), or:
286
+ pip install https://github.com/axisrobo/ea-harness/releases/download/v0.3.2/archharness-0.3.2-py3-none-any.whl
287
+ python -m archharness root # → …/site-packages/archharness/data
288
+ python -m archharness doctor
289
+ ```
290
+
291
+ Regenerate the bundled data before building a wheel with
292
+ `python scripts/assemble_data.py`.
293
+
294
+ ## Usage examples
295
+
296
+ ### Design a new system
297
+
298
+ ```
299
+ /arch-requirements
300
+ ```
301
+ Claude conducts a structured interview and produces `REQ.md` + `req.yaml`
302
+ in the active project's `output/requirements/`.
303
+
304
+ ### Generate a diagram
305
+
306
+ ```
307
+ /arch-design
308
+ ```
309
+ Produces an architecture YAML blueprint. Then, from inside the project directory:
310
+
311
+ ```bash
312
+ python ../../tools/arch-diagram-gen/arch_diagram_gen.py -i arch.yaml
313
+ # → output/diagrams/arch.drawio
314
+ ```
315
+
316
+ Or explicitly target a project from anywhere in the workspace:
317
+
318
+ ```bash
319
+ python tools/arch-diagram-gen/arch_diagram_gen.py -i projects/payments/input/arch.yaml \
320
+ --project payments
321
+ ```
322
+
323
+ ### Validate a diagram
324
+
325
+ Attach your diagram PNG and run:
326
+ ```
327
+ /arch-validate
328
+ ```
329
+ Returns a scored JSON report with `must_fix`, `should_fix`, and `consider` findings.
330
+
331
+ ### Full pipeline (OpenCode)
332
+
333
+ ```
334
+ @arch-requirements # gather requirements
335
+ @arch-design # design the architecture
336
+ @arch-validate # validate the diagram
337
+ @arch-enforce # CI enforcement gate decision
338
+ @arch-security # deep security audit
339
+ @arch-review # committee gate decision
340
+ @arch-optimize # prioritized fix backlog
341
+ @arch-report # Confluence-ready documentation
342
+ ```
343
+
344
+ ## Scoring dimensions
345
+
346
+ | Dimension | Weight |
347
+ |---|---|
348
+ | Cloud / Network Completeness | 2.0 |
349
+ | Connectivity | 1.0 |
350
+ | Technical Component Completeness | 2.0 |
351
+ | Interaction / Integration | 2.0 |
352
+ | Security Compliance | 2.0 |
353
+ | Terminology Expression | 1.0 |
354
+ | **Total** | **10.0** |
355
+
356
+ ## Validation rules
357
+
358
+ Rules live in `.claude/skills/arch-validate/rules/`:
359
+
360
+ | File | Series | Coverage |
361
+ |---|---|---|
362
+ | `diagram-rules.yaml` | V- | Shape, color, arrow direction, legend |
363
+ | `interaction-rules.yaml` | W- | Protocol, auth, integration platform placement |
364
+ | `security-rules.yaml` | S- | System auth, user auth, credential protection |
365
+ | `accuracy-rules.yaml` | E- | DC location, network segments, component completeness |
366
+ | `platform-rules.yaml` | — | AWS / Azure / private cloud specific rules |
367
+ | `compliance/terminology.yaml` | — | Cloud terms, ISO 27001 / TOGAF mapping |
368
+
369
+ ## Enforcement gate
370
+
371
+ After validation, the **arch-enforce** gate applies policy thresholds
372
+ to the validation result and emits a CI-ready decision:
373
+
374
+ | Decision | Condition | Exit code |
375
+ |----------|-----------|-----------|
376
+ | **PASS** | Score ≥ 8.0 AND no `must_fix` issues | 0 |
377
+ | **WARN** | Score ≥ 6.0 AND < 8.0 AND no `must_fix` issues | 0 |
378
+ | **BLOCK** | Score < 6.0 OR any `must_fix` issue present | 1 |
379
+
380
+ The gate is designed for automated CI pipelines. For human review,
381
+ skip the gate and use `arch-review` directly.
382
+
383
+ Policy lives in two files:
384
+ - `standards/arch-gate-policy.yaml` — enforcement bounds, override conditions, meta-control
385
+ - `standards/ci-gate-spec.yaml` — per-dimension minimums, blocking rule IDs, profiles (financial / internet-facing / internal)
386
+
387
+ See `ARCHITECTURE.md` for the full control objective and audit trail
388
+ specification.
389
+
390
+ ## Benchmark suite
391
+
392
+ The `benchmark/` directory contains the AI and Ethics revision measurement suite for:
393
+
394
+ - Exp1: strict C-layer gate-to-A-layer build overhead.
395
+ - Exp2: temperature consistency at `temperature=0.1` and `temperature=0.3`.
396
+
397
+ Current completed candidate results are documented in `benchmark/EXPERIMENT_STATUS.md` and summarized in `benchmark/results/summary.md` when local generated result files are present. Generated CSV/summary files are git-ignored; preserve final artifacts separately when preparing a manuscript revision package.
398
+
399
+ ## Supported platforms
400
+
401
+ Standards in `standards/` cover three deployment targets:
402
+
403
+ - **Private cloud** — F5 ingress, east-west isolation via integration platform, PAW/ADFS
404
+ - **AWS** — Hub-Spoke VPC, ALB+WAF, API Gateway in Spoke VPC, IAM + Secrets Manager
405
+ - **Azure** — Hub-Spoke VNET, App Gateway WAF v2, APIM in Spoke VNET, Key Vault
406
+
407
+ All platform-specific names (API gateway, message bus, K8s platform) are read
408
+ from `config.yaml` — no hardcoding in rules or skill files.
409
+
410
+ ## Project structure
411
+
412
+ ```
413
+ ea-harness/
414
+ ├── config.yaml ← Organisation profile — edit this first
415
+ ├── README.md
416
+ ├── CLAUDE.md ← Claude Code project rules
417
+ ├── AGENTS.md ← OpenCode / Codex / Copilot / Cursor project rules
418
+ ├── ARCHITECTURE.md ← Design rationale
419
+ ├── archharness/ ← `python -m archharness` CLI (workspace + tools)
420
+ ├── install.ps1 / install.sh ← cross-platform installers
421
+ ├── benchmark/ ← Experiment scripts, prompts, status, and generated results
422
+ ├── projects/<id>/ ← Workspace projects (init with `archharness init-project`)
423
+ ├── standards/ ← Platform-agnostic rules, topology specs, and gate policy
424
+ ├── tools/
425
+ │ ├── config_loader.py ← Shared config reader for Python tools
426
+ │ ├── arch-diagram-gen/ ← YAML → draw.io + PNG
427
+ │ └── arch-req-readers/ ← diagram / doc / API → req.yaml
428
+ ├── tests/ ← pytest suite
429
+ ├── scripts/ ← check_repo.py, sync_agents_skills.py (also run in CI)
430
+ ├── .github/workflows/ ← CI pipeline
431
+ ├── .github/agents/ ← GitHub Copilot custom agents (@arch-*)
432
+ ├── .claude-plugin/ ← Claude Code plugin marketplace manifest
433
+ ├── plugins/archharness/ ← Claude Code plugin bundle (skills mirror, generated)
434
+ ├── .agents/skills/ ← Codex discovery mirror (generated)
435
+ ├── .claude/skills/ ← Skill definitions (Claude Code slash commands)
436
+ └── .opencode/agents/ ← Agent definitions (OpenCode @agent-name)
437
+ ```
438
+
439
+ ## Requirements
440
+
441
+ - Claude Code, OpenCode, Codex, GitHub Copilot, or Cursor
442
+ - Python 3.10+ (`pip install -e ".[all]"` pulls everything; `pyyaml matplotlib` is the minimal set)
443
+ - draw.io desktop app (optional, for high-fidelity PNG export)
444
+
445
+ ## License
446
+
447
+ MIT — see `LICENSE`.