@robotaccomplice/architext 1.0.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/LICENSE +22 -0
- package/README.md +497 -0
- package/docs/architecture/AGENTS_APPENDIX.md +39 -0
- package/docs/architecture/ARCHITECTURE_PLAN.md +520 -0
- package/docs/architecture/LLM_ARCHITEXT.md +95 -0
- package/docs/architext/AGENTS_APPENDIX.md +39 -0
- package/docs/architext/LLM_ARCHITEXT.md +64 -0
- package/docs/architext/README.md +120 -0
- package/docs/architext/data/data-classification.json +34 -0
- package/docs/architext/data/decisions.json +54 -0
- package/docs/architext/data/flows.json +114 -0
- package/docs/architext/data/glossary.json +24 -0
- package/docs/architext/data/manifest.json +23 -0
- package/docs/architext/data/nodes.json +194 -0
- package/docs/architext/data/risks.json +59 -0
- package/docs/architext/data/views.json +91 -0
- package/docs/architext/dist/assets/index-BWZ6sEpA.js +51 -0
- package/docs/architext/dist/assets/index-iWLms0Pa.css +1 -0
- package/docs/architext/dist/compass.svg +9 -0
- package/docs/architext/dist/index.html +14 -0
- package/docs/architext/index.html +13 -0
- package/docs/architext/package-lock.json +1822 -0
- package/docs/architext/package.json +28 -0
- package/docs/architext/public/compass.svg +9 -0
- package/docs/architext/schema/data-classification.schema.json +28 -0
- package/docs/architext/schema/decisions.schema.json +33 -0
- package/docs/architext/schema/flows.schema.json +72 -0
- package/docs/architext/schema/glossary.schema.json +22 -0
- package/docs/architext/schema/manifest.schema.json +47 -0
- package/docs/architext/schema/nodes.schema.json +69 -0
- package/docs/architext/schema/risks.schema.json +34 -0
- package/docs/architext/schema/views.schema.json +48 -0
- package/docs/architext/src/main.tsx +2133 -0
- package/docs/architext/src/styles.css +1475 -0
- package/docs/architext/tools/validate-architext.mjs +163 -0
- package/docs/architext/tsconfig.json +21 -0
- package/docs/architext/vite.config.ts +47 -0
- package/docs/assets/screenshots/architext-c4.png +0 -0
- package/docs/assets/screenshots/architext-data-risks.png +0 -0
- package/docs/assets/screenshots/architext-flows.png +0 -0
- package/docs/assets/screenshots/architext-sequence.png +0 -0
- package/package.json +81 -0
- package/tools/architext-adopt.mjs +874 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Robot Accomplice
|
|
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.
|
|
22
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
# Architext
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://github.com/robot-accomplice/architext/actions/workflows/ci.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@robotaccomplice/architext)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
Architext is a local, project-owned architecture and dataflow site generated
|
|
18
|
+
from strict JSON files.
|
|
19
|
+
|
|
20
|
+
It is meant for teams using LLMs to build and maintain software. The rendered
|
|
21
|
+
site gives humans a navigable view of the system. The JSON gives future LLMs a
|
|
22
|
+
stable architecture map they can read before changing code.
|
|
23
|
+
|
|
24
|
+
Architext is not a hosted documentation platform. It is a global CLI that reads
|
|
25
|
+
project-owned JSON from a repository and serves a local viewer from the
|
|
26
|
+
installed package.
|
|
27
|
+
|
|
28
|
+
## Why This Exists
|
|
29
|
+
|
|
30
|
+
Architecture documentation usually fails in one of two ways:
|
|
31
|
+
|
|
32
|
+
- it is prose written for humans and too vague for LLMs to use reliably
|
|
33
|
+
- it is generated from code and misses intent, risks, decisions, and data
|
|
34
|
+
movement
|
|
35
|
+
|
|
36
|
+
Architext takes a different position: the machine-readable architecture model is
|
|
37
|
+
the source of truth, and the human site is a projection of that model.
|
|
38
|
+
|
|
39
|
+
The visual direction was inspired by [Dave J's x.com post about interactive
|
|
40
|
+
architecture and flow visualization](https://x.com/davej/status/2053867258653339746?s=46&t=e_qP9a_xUWuOJ6eKxFpaAQ).
|
|
41
|
+
Architext turns that kind of engineer-friendly architecture map into a local,
|
|
42
|
+
JSON-backed workflow that can live inside any project repository without
|
|
43
|
+
vendoring viewer code into that repository.
|
|
44
|
+
|
|
45
|
+
The JSON is intentionally not optimized for hand editing. LLMs are expected to
|
|
46
|
+
maintain it as architecture changes. Humans review the rendered site and the
|
|
47
|
+
JSON diffs.
|
|
48
|
+
|
|
49
|
+
## What Architext Tracks
|
|
50
|
+
|
|
51
|
+
Architext is intended to describe:
|
|
52
|
+
|
|
53
|
+
- systems, services, modules, jobs, workers, queues, stores, and external
|
|
54
|
+
services
|
|
55
|
+
- ordered application and infrastructure flows
|
|
56
|
+
- data movement and data classification
|
|
57
|
+
- trust boundaries and security controls
|
|
58
|
+
- runtime and deployment topology
|
|
59
|
+
- ownership and source-code locations
|
|
60
|
+
- observability paths
|
|
61
|
+
- architectural decisions
|
|
62
|
+
- known risks and gaps
|
|
63
|
+
- verification commands or tests tied to architectural claims
|
|
64
|
+
|
|
65
|
+
The goal is not just to draw diagrams. The goal is to preserve enough structured
|
|
66
|
+
context that an LLM working later can understand what exists, where it lives,
|
|
67
|
+
why it exists, and what must stay true.
|
|
68
|
+
|
|
69
|
+
## Design Principles
|
|
70
|
+
|
|
71
|
+
- **Local first:** every project owns its own Architext files.
|
|
72
|
+
- **Read-only viewer:** editing happens through JSON changes, not the browser.
|
|
73
|
+
- **Strict schema:** invalid data should prevent rendering.
|
|
74
|
+
- **LLM-maintained:** JSON is structured for machine upkeep, not casual manual
|
|
75
|
+
authoring.
|
|
76
|
+
- **Human-readable output:** engineers should be able to inspect flows and
|
|
77
|
+
components quickly.
|
|
78
|
+
- **Ordered flows:** flows are explicit step-by-step paths, not loose dependency
|
|
79
|
+
graphs.
|
|
80
|
+
- **Project-neutral look and feel:** projects provide data, not custom UI
|
|
81
|
+
behavior.
|
|
82
|
+
- **No hosted dependency:** the site runs from a local dev server or static
|
|
83
|
+
build.
|
|
84
|
+
- **No runtime CDN:** scripts, styles, fonts, schemas, and assets must be local
|
|
85
|
+
to the repository or bundled into the build.
|
|
86
|
+
|
|
87
|
+
## Planned Experience
|
|
88
|
+
|
|
89
|
+
The viewer will use a dense engineering layout:
|
|
90
|
+
|
|
91
|
+
- collapsible navigation on the left
|
|
92
|
+
- large diagram canvas in the center
|
|
93
|
+
- selected-node and selected-step details on the right
|
|
94
|
+
- search and filters
|
|
95
|
+
- pan, zoom, fit, and maximize controls
|
|
96
|
+
- highlighted ordered paths through flows
|
|
97
|
+
- scrollable detail sections for architecture, security, data, risks, and tests
|
|
98
|
+
|
|
99
|
+
The UI should be functional before it is pretty. Diagram space, legibility, and
|
|
100
|
+
fast inspection matter more than branding.
|
|
101
|
+
|
|
102
|
+
## Current Demo
|
|
103
|
+
|
|
104
|
+
The repository demo now documents Architext itself: global CLI lifecycle,
|
|
105
|
+
package-owned viewer runtime, data-only target repositories, migrations,
|
|
106
|
+
validation, and release packaging.
|
|
107
|
+
|
|
108
|
+

|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+
## Install Or Upgrade In A Project
|
|
117
|
+
|
|
118
|
+
The simplest interface is the `architext` CLI.
|
|
119
|
+
|
|
120
|
+
Install it globally:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
npm install -g @robotaccomplice/architext
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
From a local Architext clone during development, install the current checkout:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
npm install -g /path/to/architext
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
After that, from any target project repository:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
architext sync
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
You can also pass a target repository explicitly:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
architext sync /path/to/your-project
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The default `sync` behavior detects the current state:
|
|
145
|
+
|
|
146
|
+
- if `docs/architext/data` is absent, it installs neutral starter data
|
|
147
|
+
- if an old copied-template install is present, it migrates the repository to
|
|
148
|
+
the data-only layout
|
|
149
|
+
- if the repository is current, it validates and reports the next action
|
|
150
|
+
|
|
151
|
+
The script prompts before writing changes. In a git repository, it also asks
|
|
152
|
+
whether to use the current branch or create a new branch first.
|
|
153
|
+
|
|
154
|
+
Architext no longer installs dependencies inside target repositories. Viewer
|
|
155
|
+
code, schemas, validation, and starter templates are package-owned. Target
|
|
156
|
+
repositories commit architecture data, lifecycle metadata, and optional
|
|
157
|
+
repository-level agent instructions.
|
|
158
|
+
|
|
159
|
+
When the target repository has a root `package.json`, the CLI can add
|
|
160
|
+
convenience scripts:
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
npm run architext
|
|
164
|
+
npm run architext:validate
|
|
165
|
+
npm run architext:build
|
|
166
|
+
npm run architext:doctor
|
|
167
|
+
npm run architext:prompt
|
|
168
|
+
npm run architext:clean
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Those root scripts call the global `architext` CLI with `.` as the target path.
|
|
172
|
+
|
|
173
|
+
Install explicitly:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
architext sync
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Upgrade explicitly:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
architext sync
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Run non-interactively:
|
|
186
|
+
|
|
187
|
+
```sh
|
|
188
|
+
architext sync . --yes --branch current --append-agents --root-scripts
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Useful options:
|
|
192
|
+
|
|
193
|
+
- pass `[path]` after the command to operate on a repository other than the
|
|
194
|
+
current directory.
|
|
195
|
+
- `--dry-run` shows intended changes without writing files.
|
|
196
|
+
- `--branch new --branch-name <name>` creates a branch before writing.
|
|
197
|
+
- `--branch current` writes to the current branch.
|
|
198
|
+
- `--append-agents` creates or appends both `AGENTS.md` and `CLAUDE.md` with the
|
|
199
|
+
Architext instructions.
|
|
200
|
+
- `--no-agents` skips `AGENTS.md` and `CLAUDE.md` prompts.
|
|
201
|
+
- `--root-scripts` adds root `package.json` convenience scripts.
|
|
202
|
+
- `--no-root-scripts` skips root `package.json` script prompts.
|
|
203
|
+
- `--update-gitignore` adds Architext generated artifact ignores without
|
|
204
|
+
prompting.
|
|
205
|
+
- `--no-gitignore` skips `.gitignore` prompts.
|
|
206
|
+
- `--skip-validate` skips architecture JSON validation after writing artifacts.
|
|
207
|
+
- `--force` reruns lifecycle management even when the repository appears
|
|
208
|
+
current.
|
|
209
|
+
|
|
210
|
+
Migration preserves `docs/architext/data/*.json` by default because those files
|
|
211
|
+
belong to the target project. It removes copied viewer/schema/tool files from
|
|
212
|
+
old installs, rewrites Architext lifecycle metadata, and corrects old agent
|
|
213
|
+
instructions so agents use the global CLI and edit only target-owned data. Use
|
|
214
|
+
`--overwrite-data` only when intentionally resetting the target architecture
|
|
215
|
+
data to neutral starter data.
|
|
216
|
+
|
|
217
|
+
By default, the script also prompts to keep `docs/architext/dist/` ignored.
|
|
218
|
+
That directory is generated by `architext build` and should not be committed.
|
|
219
|
+
|
|
220
|
+
## Legacy Copied-Template Upgrades
|
|
221
|
+
|
|
222
|
+
Architext 1.0.0 is a breaking upgrade for repositories that previously copied
|
|
223
|
+
the full template into `docs/architext`. Those installs usually contain files
|
|
224
|
+
such as:
|
|
225
|
+
|
|
226
|
+
```text
|
|
227
|
+
docs/architext/src/
|
|
228
|
+
docs/architext/schema/
|
|
229
|
+
docs/architext/tools/
|
|
230
|
+
docs/architext/public/
|
|
231
|
+
docs/architext/package.json
|
|
232
|
+
docs/architext/package-lock.json
|
|
233
|
+
docs/architext/vite.config.ts
|
|
234
|
+
docs/architext/tsconfig.json
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Those files are package-owned in 1.0.0 and should be removed from target
|
|
238
|
+
repositories during migration. The project-owned files are preserved:
|
|
239
|
+
|
|
240
|
+
```text
|
|
241
|
+
docs/architext/data/*.json
|
|
242
|
+
docs/architext/.architext.json
|
|
243
|
+
AGENTS.md and/or CLAUDE.md Architext section, when present
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Preview a legacy migration first:
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
architext sync /path/to/project --dry-run
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The dry-run reports copied package-owned files that would be removed, confirms
|
|
253
|
+
that `docs/architext/data/*.json` is preserved, reports agent instruction
|
|
254
|
+
updates, and runs validation against the preserved data when possible.
|
|
255
|
+
|
|
256
|
+
Run the migration:
|
|
257
|
+
|
|
258
|
+
```sh
|
|
259
|
+
architext sync /path/to/project --yes --branch current
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
During migration, Architext replaces the managed `## Architext Architecture
|
|
263
|
+
Documentation` section in `AGENTS.md` and `CLAUDE.md` with global-CLI guidance.
|
|
264
|
+
Unrelated project instructions outside that section are preserved. After
|
|
265
|
+
migration, agents should update only `docs/architext/data/*.json`, run
|
|
266
|
+
`architext validate [path]`, and use `architext serve [path]` for visual review.
|
|
267
|
+
|
|
268
|
+
The CLI also writes lifecycle metadata to:
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
docs/architext/.architext.json
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
This file records the CLI version, update time, operation, migrated install
|
|
275
|
+
state, managed instruction files, gitignore/root-script handling, and last
|
|
276
|
+
validation state. It is automation state, not the architecture model.
|
|
277
|
+
|
|
278
|
+
## Management Commands
|
|
279
|
+
|
|
280
|
+
Once the CLI is available, these commands work from the target project root:
|
|
281
|
+
|
|
282
|
+
```sh
|
|
283
|
+
architext doctor [path]
|
|
284
|
+
architext status [path]
|
|
285
|
+
architext status [path] --json
|
|
286
|
+
architext serve [path]
|
|
287
|
+
architext validate [path]
|
|
288
|
+
architext build [path]
|
|
289
|
+
architext prompt [path]
|
|
290
|
+
architext clean [path]
|
|
291
|
+
architext explain flows
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Use `doctor` when something looks wrong. It reports the installed version,
|
|
295
|
+
whether an upgrade is needed, validation status, missing ignore rules, missing
|
|
296
|
+
AGENTS/CLAUDE appendix sections, root script status, and accidentally tracked
|
|
297
|
+
generated artifacts.
|
|
298
|
+
|
|
299
|
+
Use `prompt` to print LLM-ready instructions:
|
|
300
|
+
|
|
301
|
+
```sh
|
|
302
|
+
architext prompt --mode initial-buildout
|
|
303
|
+
architext prompt --mode architecture-change
|
|
304
|
+
architext prompt --mode repair-validation
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Use `clean` to remove generated local build output. It removes
|
|
308
|
+
`docs/architext/dist/` by default. Pass `--node-modules` only when you also want
|
|
309
|
+
to remove local dependencies:
|
|
310
|
+
|
|
311
|
+
```sh
|
|
312
|
+
architext clean --node-modules
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Local Usage
|
|
316
|
+
|
|
317
|
+
From a project that has adopted Architext:
|
|
318
|
+
|
|
319
|
+
```sh
|
|
320
|
+
architext serve
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Then open:
|
|
324
|
+
|
|
325
|
+
```text
|
|
326
|
+
http://localhost:4317/
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Architext requires a local server instead of direct `file://` loading. That
|
|
330
|
+
avoids browser-specific restrictions around fetching local JSON files.
|
|
331
|
+
|
|
332
|
+
The running site must not fetch framework code, stylesheets, fonts, or assets
|
|
333
|
+
from remote URLs.
|
|
334
|
+
|
|
335
|
+
For static usage after a build:
|
|
336
|
+
|
|
337
|
+
```sh
|
|
338
|
+
architext build
|
|
339
|
+
cd docs/architext/dist
|
|
340
|
+
python3 -m http.server 4317
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Project scripts should remain cross-platform. Avoid shell-specific command
|
|
344
|
+
chains in npm scripts so the same commands work on Windows, Linux, and macOS.
|
|
345
|
+
|
|
346
|
+
## LLM JSON Build-Out Prompt
|
|
347
|
+
|
|
348
|
+
After installing Architext into a target repository, give the project LLM a
|
|
349
|
+
direct instruction like this:
|
|
350
|
+
|
|
351
|
+
```text
|
|
352
|
+
You are working in this repository. Build out Architext for this project.
|
|
353
|
+
|
|
354
|
+
First read:
|
|
355
|
+
- AGENTS.md and/or CLAUDE.md if present
|
|
356
|
+
- docs/architext/data/*.json
|
|
357
|
+
|
|
358
|
+
Then inspect the codebase and replace the neutral starter data with this
|
|
359
|
+
project's real architecture data. Update only docs/architext/data/*.json unless
|
|
360
|
+
the Architext package itself is being changed.
|
|
361
|
+
|
|
362
|
+
Required output:
|
|
363
|
+
- nodes.json: real actors, systems, services, clients, modules, workers,
|
|
364
|
+
queues/topics, data stores, external services, deployment units, and trust
|
|
365
|
+
boundaries
|
|
366
|
+
- flows.json: ordered user/system/data flows with real source and target node
|
|
367
|
+
IDs, data classes, guarantees, failure behavior, observability, and
|
|
368
|
+
verification references
|
|
369
|
+
- views.json: system map, dataflow, deployment, sequence, and C4 context /
|
|
370
|
+
container / component projections using existing node IDs
|
|
371
|
+
- data-classification.json: data classes actually handled by the project
|
|
372
|
+
- decisions.json: accepted architecture decisions or links to existing ADRs
|
|
373
|
+
- risks.json: real architecture, security, privacy, operational, and data risks
|
|
374
|
+
- glossary.json: project terms that future LLMs need to understand
|
|
375
|
+
- manifest.json: project identity, default view, and file references
|
|
376
|
+
|
|
377
|
+
Persist in git:
|
|
378
|
+
- docs/architext/data/*.json
|
|
379
|
+
- docs/architext/.architext.json
|
|
380
|
+
|
|
381
|
+
Ensure these generated/local artifacts are ignored:
|
|
382
|
+
- docs/architext/dist/
|
|
383
|
+
- .DS_Store
|
|
384
|
+
- editor/OS temp files
|
|
385
|
+
- local server logs
|
|
386
|
+
- screenshots created only for debugging unless intentionally added to project
|
|
387
|
+
documentation
|
|
388
|
+
|
|
389
|
+
Rules:
|
|
390
|
+
- Reuse stable IDs for existing concepts.
|
|
391
|
+
- Create nodes before referencing them from flows or views.
|
|
392
|
+
- Keep flows ordered.
|
|
393
|
+
- Do not invent certainty. Mark unknowns and known gaps explicitly.
|
|
394
|
+
- Prefer source-path-backed claims.
|
|
395
|
+
- Do not edit application code for this task.
|
|
396
|
+
- Do not edit copied viewer, schema, package, Vite, or local tool files in the
|
|
397
|
+
target repository.
|
|
398
|
+
- Run `architext validate` before claiming completion.
|
|
399
|
+
- If validation fails, fix the JSON and rerun it.
|
|
400
|
+
|
|
401
|
+
When finished, summarize what files changed, what architecture areas are well
|
|
402
|
+
covered, what remains uncertain, and the validation result.
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
## Expected Project Structure
|
|
406
|
+
|
|
407
|
+
```text
|
|
408
|
+
docs/
|
|
409
|
+
architext/
|
|
410
|
+
data/
|
|
411
|
+
manifest.json
|
|
412
|
+
nodes.json
|
|
413
|
+
flows.json
|
|
414
|
+
views.json
|
|
415
|
+
data-classification.json
|
|
416
|
+
decisions.json
|
|
417
|
+
risks.json
|
|
418
|
+
glossary.json
|
|
419
|
+
.architext.json
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
The exact files may evolve, but the split is intentional: nodes, flows, views,
|
|
423
|
+
data classification, decisions, and risks are separate concerns.
|
|
424
|
+
|
|
425
|
+
## Data Model Overview
|
|
426
|
+
|
|
427
|
+
`manifest.json` is the entrypoint. It identifies the project, schema version,
|
|
428
|
+
default view, and data files to load.
|
|
429
|
+
|
|
430
|
+
`nodes.json` describes architectural elements such as services, modules,
|
|
431
|
+
clients, actors, data stores, queues, workers, external services, and trust
|
|
432
|
+
boundaries.
|
|
433
|
+
|
|
434
|
+
`flows.json` describes ordered flows. Each step references known nodes and
|
|
435
|
+
documents what moves, what is validated, what can fail, and what proves the
|
|
436
|
+
behavior.
|
|
437
|
+
|
|
438
|
+
`views.json` describes how the same model is projected into system maps, C4
|
|
439
|
+
views, dataflow diagrams, deployment views, and risk overlays.
|
|
440
|
+
|
|
441
|
+
`data-classification.json` defines the data categories used by flows and nodes.
|
|
442
|
+
|
|
443
|
+
`decisions.json` and `risks.json` connect architecture facts to the reasoning
|
|
444
|
+
and tradeoffs behind them.
|
|
445
|
+
|
|
446
|
+
## LLM Workflow
|
|
447
|
+
|
|
448
|
+
An LLM working in a project that uses Architext should:
|
|
449
|
+
|
|
450
|
+
1. Read the existing Architext data before changing architecture.
|
|
451
|
+
2. Update the relevant JSON when architecture changes.
|
|
452
|
+
3. Reuse existing IDs for existing concepts.
|
|
453
|
+
4. Add new nodes before referencing them in flows.
|
|
454
|
+
5. Keep flows ordered.
|
|
455
|
+
6. Update data classification when data movement changes.
|
|
456
|
+
7. Update risks when adding persistence, external services, trust boundaries,
|
|
457
|
+
sensitive data, async processing, or operational complexity.
|
|
458
|
+
8. Run validation before claiming the task is complete.
|
|
459
|
+
|
|
460
|
+
Broken architecture JSON is worse than missing JSON because it gives future
|
|
461
|
+
humans and LLMs false confidence.
|
|
462
|
+
|
|
463
|
+
## Example Project
|
|
464
|
+
|
|
465
|
+
Architext includes a self-hosted example based on Architext itself. The example
|
|
466
|
+
documents the global CLI, package-owned viewer, validation flow, data-only
|
|
467
|
+
target repository layout, migration behavior, and release/package lifecycle.
|
|
468
|
+
|
|
469
|
+
## Distribution
|
|
470
|
+
|
|
471
|
+
Architext is intended to be installed as a global npm CLI:
|
|
472
|
+
|
|
473
|
+
```sh
|
|
474
|
+
npm install -g @robotaccomplice/architext
|
|
475
|
+
architext sync
|
|
476
|
+
architext serve
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
## Repository Status
|
|
480
|
+
|
|
481
|
+
This repository now includes the working local viewer, schemas, validation
|
|
482
|
+
tooling, global CLI lifecycle script, and the self-hosted Architext demo model.
|
|
483
|
+
|
|
484
|
+
Core documents:
|
|
485
|
+
|
|
486
|
+
- [Architecture Plan](docs/architecture/ARCHITECTURE_PLAN.md)
|
|
487
|
+
- [LLM Architext Contract](docs/architecture/LLM_ARCHITEXT.md)
|
|
488
|
+
- [Agent Instructions Appendix](docs/architecture/AGENTS_APPENDIX.md)
|
|
489
|
+
|
|
490
|
+
## Attribution
|
|
491
|
+
|
|
492
|
+
Architext was inspired by [Dave J's x.com post about interactive architecture
|
|
493
|
+
and flow visualization](https://x.com/davej/status/2053867258653339746?s=46&t=e_qP9a_xUWuOJ6eKxFpaAQ).
|
|
494
|
+
|
|
495
|
+
## License
|
|
496
|
+
|
|
497
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Architext Agent Instructions Appendix
|
|
2
|
+
|
|
3
|
+
Add this section to a target project's `AGENTS.md` or `CLAUDE.md` when adopting
|
|
4
|
+
Architext.
|
|
5
|
+
|
|
6
|
+
```markdown
|
|
7
|
+
## Architext Architecture Documentation
|
|
8
|
+
|
|
9
|
+
This project uses `docs/architext/data/*.json` as the machine-readable
|
|
10
|
+
architecture source of truth.
|
|
11
|
+
|
|
12
|
+
When changing architecture, data flow, persistence, external integrations, trust
|
|
13
|
+
boundaries, deployment topology, observability paths, or major module
|
|
14
|
+
responsibilities, update the relevant Architext JSON files before completing the
|
|
15
|
+
task.
|
|
16
|
+
|
|
17
|
+
Run the Architext validator after edits:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
architext validate [path]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use the local viewer for review:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
architext serve [path]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The optional path defaults to the current directory. Target repositories should
|
|
30
|
+
not vendor or edit Architext viewer, schema, tool, package, or Vite files.
|
|
31
|
+
Those are owned by the globally installed `architext` package. Edit project
|
|
32
|
+
architecture data under `docs/architext/data/*.json`; use `architext sync
|
|
33
|
+
[path]` to install or migrate lifecycle metadata and instructions.
|
|
34
|
+
|
|
35
|
+
Use `architext doctor [path]` to inspect installation health and `architext
|
|
36
|
+
prompt [path]` to print the current LLM build-out or maintenance instructions.
|
|
37
|
+
Do not claim the architecture documentation is current if validation fails or
|
|
38
|
+
was skipped.
|
|
39
|
+
```
|