@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.
Files changed (43) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +497 -0
  3. package/docs/architecture/AGENTS_APPENDIX.md +39 -0
  4. package/docs/architecture/ARCHITECTURE_PLAN.md +520 -0
  5. package/docs/architecture/LLM_ARCHITEXT.md +95 -0
  6. package/docs/architext/AGENTS_APPENDIX.md +39 -0
  7. package/docs/architext/LLM_ARCHITEXT.md +64 -0
  8. package/docs/architext/README.md +120 -0
  9. package/docs/architext/data/data-classification.json +34 -0
  10. package/docs/architext/data/decisions.json +54 -0
  11. package/docs/architext/data/flows.json +114 -0
  12. package/docs/architext/data/glossary.json +24 -0
  13. package/docs/architext/data/manifest.json +23 -0
  14. package/docs/architext/data/nodes.json +194 -0
  15. package/docs/architext/data/risks.json +59 -0
  16. package/docs/architext/data/views.json +91 -0
  17. package/docs/architext/dist/assets/index-BWZ6sEpA.js +51 -0
  18. package/docs/architext/dist/assets/index-iWLms0Pa.css +1 -0
  19. package/docs/architext/dist/compass.svg +9 -0
  20. package/docs/architext/dist/index.html +14 -0
  21. package/docs/architext/index.html +13 -0
  22. package/docs/architext/package-lock.json +1822 -0
  23. package/docs/architext/package.json +28 -0
  24. package/docs/architext/public/compass.svg +9 -0
  25. package/docs/architext/schema/data-classification.schema.json +28 -0
  26. package/docs/architext/schema/decisions.schema.json +33 -0
  27. package/docs/architext/schema/flows.schema.json +72 -0
  28. package/docs/architext/schema/glossary.schema.json +22 -0
  29. package/docs/architext/schema/manifest.schema.json +47 -0
  30. package/docs/architext/schema/nodes.schema.json +69 -0
  31. package/docs/architext/schema/risks.schema.json +34 -0
  32. package/docs/architext/schema/views.schema.json +48 -0
  33. package/docs/architext/src/main.tsx +2133 -0
  34. package/docs/architext/src/styles.css +1475 -0
  35. package/docs/architext/tools/validate-architext.mjs +163 -0
  36. package/docs/architext/tsconfig.json +21 -0
  37. package/docs/architext/vite.config.ts +47 -0
  38. package/docs/assets/screenshots/architext-c4.png +0 -0
  39. package/docs/assets/screenshots/architext-data-risks.png +0 -0
  40. package/docs/assets/screenshots/architext-flows.png +0 -0
  41. package/docs/assets/screenshots/architext-sequence.png +0 -0
  42. package/package.json +81 -0
  43. package/tools/architext-adopt.mjs +874 -0
@@ -0,0 +1,64 @@
1
+ # LLM Architext Contract
2
+
3
+ Architext JSON files are the machine-readable architecture source of truth for
4
+ this project.
5
+
6
+ When architecture changes, update the relevant files under
7
+ `docs/architext/data/` before claiming the implementation is complete.
8
+
9
+ ## Required Behavior
10
+
11
+ - Read existing Architext data before editing it.
12
+ - Reuse existing IDs for existing concepts.
13
+ - Create new nodes before referencing them from flows or views.
14
+ - Keep flows ordered.
15
+ - Update data classification whenever data movement changes.
16
+ - Update risks when adding external dependencies, persistence, async
17
+ processing, sensitive data handling, trust boundary crossings, or operational
18
+ complexity.
19
+ - Prefer source-path-backed claims.
20
+ - Mark uncertainty explicitly instead of inventing details.
21
+ - Run `architext validate [path]` after changing data.
22
+ - Do not claim Architext is current if validation failed or was skipped.
23
+ - Do not edit copied viewer, schema, package, Vite, or local tool files in a
24
+ target repository. Those files are package-owned in Architext 1.0+.
25
+
26
+ ## Persistence Rules
27
+
28
+ Persist these project-owned files in git:
29
+
30
+ - `docs/architext/data/*.json`
31
+ - `docs/architext/.architext.json`
32
+ - repository-level `AGENTS.md` or `CLAUDE.md` Architext instructions, when
33
+ present
34
+
35
+ Do not persist generated or local runtime artifacts:
36
+
37
+ - `docs/architext/dist/`
38
+ - `.DS_Store`
39
+ - editor/OS temp files
40
+ - local server logs
41
+ - screenshots created only for debugging unless intentionally added to project
42
+ documentation
43
+
44
+ If the target project does not already ignore generated artifacts, use
45
+ `architext sync [path]` to update lifecycle metadata, instructions, and ignore
46
+ rules.
47
+
48
+ ## Update Triggers
49
+
50
+ Update Architext when changing:
51
+
52
+ - module or service responsibilities
53
+ - public or internal APIs
54
+ - queues, topics, jobs, or workers
55
+ - data stores
56
+ - external integrations
57
+ - authentication or authorization behavior
58
+ - trust boundaries
59
+ - deployment topology
60
+ - observability paths
61
+ - sensitive data handling
62
+ - core business flows
63
+ - architecture decisions
64
+ - known architecture risks
@@ -0,0 +1,120 @@
1
+ # Architext Template
2
+
3
+ This directory is the package-owned Architext viewer, schema, and starter data.
4
+ Target repositories should not copy or edit this implementation. They own only
5
+ their `docs/architext/data/*.json` files, lifecycle metadata, and optional
6
+ repository-level agent instructions.
7
+
8
+ ## Commands
9
+
10
+ From a target project root, use the global Architext CLI:
11
+
12
+ ```sh
13
+ architext serve
14
+ architext validate
15
+ architext build
16
+ architext doctor
17
+ architext prompt
18
+ ```
19
+
20
+ Each command also accepts an optional target path:
21
+
22
+ ```sh
23
+ architext serve /path/to/project
24
+ architext validate /path/to/project
25
+ ```
26
+
27
+ If you are developing Architext itself, use the local npm scripts:
28
+
29
+ Install local dependencies:
30
+
31
+ ```sh
32
+ npm install
33
+ ```
34
+
35
+ Validate architecture data:
36
+
37
+ ```sh
38
+ npm run validate
39
+ ```
40
+
41
+ Run the local development server:
42
+
43
+ ```sh
44
+ npm run dev
45
+ ```
46
+
47
+ Build static assets:
48
+
49
+ ```sh
50
+ npm run build
51
+ ```
52
+
53
+ Preview the static build locally:
54
+
55
+ ```sh
56
+ npm run preview
57
+ ```
58
+
59
+ The npm scripts avoid shell-specific command chains so they work on Windows,
60
+ Linux, and macOS.
61
+
62
+ ## Upgrades
63
+
64
+ Target repositories are data-only in Architext 1.0+. From the target project
65
+ root, use the package CLI:
66
+
67
+ ```sh
68
+ architext sync
69
+ ```
70
+
71
+ The script detects whether Architext data is absent, current, or from an older
72
+ copied-template install. It prompts before writing files and can create a git
73
+ branch before making changes. Migration preserves `docs/architext/data/*.json`
74
+ by default, removes copied implementation files, updates lifecycle metadata,
75
+ and corrects Architext sections in `AGENTS.md` and `CLAUDE.md`.
76
+
77
+ The script can also maintain the target repository `.gitignore`. Generated
78
+ local artifacts, especially `docs/architext/dist/`, should be ignored.
79
+
80
+ The CLI writes lifecycle metadata to `.architext.json`. Keep that file with the
81
+ project so automation can report CLI version, update time, managed instruction
82
+ files, copied-install migration state, and last validation state.
83
+
84
+ ## Management
85
+
86
+ Useful project-root commands:
87
+
88
+ ```sh
89
+ architext doctor
90
+ architext status --json
91
+ architext prompt --mode architecture-change
92
+ architext clean
93
+ architext clean --node-modules
94
+ architext explain nodes
95
+ ```
96
+
97
+ `doctor` is read-only and should be the first command when an install looks
98
+ stale or broken.
99
+
100
+ ## Data Entry Point
101
+
102
+ The viewer loads:
103
+
104
+ ```text
105
+ data/manifest.json
106
+ ```
107
+
108
+ The manifest points to the remaining JSON files. Keep paths local to this
109
+ directory. Do not load runtime assets, schemas, scripts, styles, or fonts from
110
+ remote URLs.
111
+
112
+ ## Validation
113
+
114
+ `npm run validate` performs two checks:
115
+
116
+ - JSON Schema validation for each data file
117
+ - cross-reference validation for IDs shared across nodes, flows, views, risks,
118
+ decisions, and data classifications
119
+
120
+ If validation fails, the architecture model is not trustworthy.
@@ -0,0 +1,34 @@
1
+ {
2
+ "classes": [
3
+ {
4
+ "id": "architecture-model",
5
+ "name": "Architecture model",
6
+ "sensitivity": "medium",
7
+ "handling": "Review JSON diffs before trusting generated architecture claims."
8
+ },
9
+ {
10
+ "id": "repository-metadata",
11
+ "name": "Repository metadata",
12
+ "sensitivity": "low",
13
+ "handling": "Lifecycle state may be committed, but it is not the architecture source of truth."
14
+ },
15
+ {
16
+ "id": "agent-instructions",
17
+ "name": "Agent instructions",
18
+ "sensitivity": "medium",
19
+ "handling": "Preserve project-owned instructions and replace only the Architext-managed section."
20
+ },
21
+ {
22
+ "id": "package-assets",
23
+ "name": "Package assets",
24
+ "sensitivity": "low",
25
+ "handling": "Serve locally from the installed package; do not copy into target repositories."
26
+ },
27
+ {
28
+ "id": "validation-output",
29
+ "name": "Validation output",
30
+ "sensitivity": "low",
31
+ "handling": "Use to repair JSON references and schema mismatches before claiming documentation is current."
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "decisions": [
3
+ {
4
+ "id": "global-cli-data-only",
5
+ "status": "accepted",
6
+ "title": "Use a global CLI with data-only target repositories",
7
+ "context": "Copied templates made every target repository carry viewer code, schemas, local tools, package files, and dependencies.",
8
+ "decision": "Architext 1.0 serves viewer assets, schemas, validation, and starter templates from the installed package. Target repositories commit only data, metadata, and optional instructions.",
9
+ "consequences": ["Per-repository upgrades become smaller", "Global CLI availability becomes the primary operating assumption", "Old copied installs require migration"],
10
+ "relatedNodes": ["architext-cli", "viewer-runtime", "target-repository", "target-data-files"],
11
+ "relatedFlows": ["fresh-install", "copied-install-migration", "local-review"]
12
+ },
13
+ {
14
+ "id": "safe-migration",
15
+ "status": "accepted",
16
+ "title": "Preserve architecture facts during migration",
17
+ "context": "Old installs may contain valuable project-owned data mixed with copied package-owned implementation files.",
18
+ "decision": "Migration preserves docs/architext/data/*.json, removes copied package-owned files, updates metadata, and corrects managed agent instruction sections.",
19
+ "consequences": ["Architecture facts are not rewritten silently", "Dry-run output must show destructive removals", "Instruction updates are part of migration correctness"],
20
+ "relatedNodes": ["architext-cli", "target-repository", "target-data-files"],
21
+ "relatedFlows": ["copied-install-migration"]
22
+ },
23
+ {
24
+ "id": "managed-agent-section",
25
+ "status": "accepted",
26
+ "title": "Manage one Architext instruction section",
27
+ "context": "Agents need current rules, but project-specific instructions outside Architext must remain authoritative.",
28
+ "decision": "The CLI replaces or appends a single section headed 'Architext Architecture Documentation' in AGENTS.md and CLAUDE.md.",
29
+ "consequences": ["Old copied-template instructions can be corrected automatically", "Unrelated project instructions are preserved", "Highly unusual Markdown layouts may need manual review"],
30
+ "relatedNodes": ["architext-cli", "llm-agent", "target-repository"],
31
+ "relatedFlows": ["copied-install-migration", "architecture-maintenance"]
32
+ },
33
+ {
34
+ "id": "package-owned-schemas",
35
+ "status": "accepted",
36
+ "title": "Validate with package-owned schemas",
37
+ "context": "Committing schemas into every target repository made schema upgrades a repo-by-repo file-copy problem.",
38
+ "decision": "Schemas ship with the Architext package and are used by architext validate [path].",
39
+ "consequences": ["Validation behavior tracks the installed CLI version", "Schema migrations must be explicit when data shape changes", "Target repos no longer review schema diffs unless Architext itself changes"],
40
+ "relatedNodes": ["schema-validator", "package-schemas", "target-data-files"],
41
+ "relatedFlows": ["architecture-maintenance", "copied-install-migration"]
42
+ },
43
+ {
44
+ "id": "major-version-release",
45
+ "status": "accepted",
46
+ "title": "Ship the distribution change as a major version",
47
+ "context": "The target repository footprint and upgrade behavior are incompatible with the pre-1.0 copied-template model.",
48
+ "decision": "Release the global CLI/data-only model as Architext 1.0.0.",
49
+ "consequences": ["Users receive a clear breaking-change boundary", "Existing copied installs are migration inputs", "Documentation can stop describing copied templates as the normal path"],
50
+ "relatedNodes": ["package-artifacts", "architext-cli"],
51
+ "relatedFlows": ["release-packaging", "copied-install-migration"]
52
+ }
53
+ ]
54
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "flows": [
3
+ {
4
+ "id": "fresh-install",
5
+ "name": "Fresh data-only install",
6
+ "status": "implemented",
7
+ "summary": "A maintainer installs Architext into a repository without copying viewer implementation files.",
8
+ "trigger": "Maintainer runs architext sync [path] in a repository with no Architext data.",
9
+ "actors": ["maintainer"],
10
+ "steps": [
11
+ { "id": "resolve-target", "from": "maintainer", "to": "architext-cli", "action": "resolveTargetPath", "summary": "CLI resolves the optional path argument or defaults to the current directory.", "data": ["repository-metadata"] },
12
+ { "id": "write-starter-data", "from": "architext-cli", "to": "target-data-files", "action": "writeStarterData", "summary": "CLI writes neutral starter data under docs/architext/data.", "data": ["architecture-model"] },
13
+ { "id": "write-metadata", "from": "architext-cli", "to": "target-repository", "action": "writeLifecycleMetadata", "summary": "CLI writes docs/architext/.architext.json with install state.", "data": ["repository-metadata"] },
14
+ { "id": "validate-install", "from": "architext-cli", "to": "schema-validator", "action": "validateStarterModel", "summary": "Package-owned schemas validate the starter model.", "data": ["architecture-model", "validation-output"] }
15
+ ],
16
+ "guarantees": ["Target repo does not receive copied viewer, schema, tool, package, or Vite files."],
17
+ "failureBehavior": ["Invalid starter data fails sync before claiming installation health."],
18
+ "observability": ["CLI output", "doctor status", "validation output"],
19
+ "verification": ["architext sync /tmp/repo --yes", "architext validate /tmp/repo"],
20
+ "knownGaps": ["Install prompt UX still needs real user testing on Windows shells."]
21
+ },
22
+ {
23
+ "id": "copied-install-migration",
24
+ "name": "Copied install migration",
25
+ "status": "implemented",
26
+ "summary": "An existing copied-template install is converted into the 1.0 data-only layout.",
27
+ "trigger": "Maintainer runs architext sync [path] where docs/architext contains copied implementation files.",
28
+ "actors": ["maintainer"],
29
+ "steps": [
30
+ { "id": "detect-copied-files", "from": "architext-cli", "to": "target-repository", "action": "detectCopiedInstall", "summary": "CLI detects package-owned files such as src, schema, tools, package.json, and Vite config.", "data": ["repository-metadata"] },
31
+ { "id": "preserve-data", "from": "architext-cli", "to": "target-data-files", "action": "preserveArchitectureData", "summary": "CLI leaves docs/architext/data/*.json untouched unless overwrite is explicit.", "data": ["architecture-model"] },
32
+ { "id": "rewrite-instructions", "from": "architext-cli", "to": "target-repository", "action": "replaceArchitextInstructionSection", "summary": "CLI replaces old Architext agent sections with global-CLI guidance while preserving unrelated instructions.", "data": ["agent-instructions"] },
33
+ { "id": "remove-copied-files", "from": "architext-cli", "to": "target-repository", "action": "removePackageOwnedFiles", "summary": "CLI removes copied viewer, schema, tool, package, and Vite files from the target repository.", "data": ["package-assets"] },
34
+ { "id": "validate-migration", "from": "architext-cli", "to": "schema-validator", "action": "validateMigratedData", "summary": "CLI validates preserved target data against package-owned schemas.", "data": ["architecture-model", "validation-output"] }
35
+ ],
36
+ "guarantees": ["Architecture facts are not rewritten silently.", "Agent instructions no longer tell agents to edit copied package-owned files."],
37
+ "failureBehavior": ["Dry-run exposes destructive removals; validation failure points to repair prompt."],
38
+ "observability": ["Dry-run output", "doctor copied install status", "Git diff"],
39
+ "verification": ["architext sync ../roboticus --dry-run", "architext doctor ../roboticus"],
40
+ "knownGaps": ["Instruction replacement is intentionally marker-based and does not parse arbitrary Markdown ASTs."]
41
+ },
42
+ {
43
+ "id": "architecture-maintenance",
44
+ "name": "Architecture data maintenance",
45
+ "status": "implemented",
46
+ "summary": "An LLM agent updates architecture data in response to real repository changes.",
47
+ "trigger": "A code change alters architecture, persistence, data flow, external integrations, deployment, risks, or decisions.",
48
+ "actors": ["llm-agent"],
49
+ "steps": [
50
+ { "id": "read-instructions", "from": "llm-agent", "to": "target-repository", "action": "readAgentInstructions", "summary": "Agent reads the managed Architext section and any project-specific constraints.", "data": ["agent-instructions"] },
51
+ { "id": "read-data", "from": "llm-agent", "to": "target-data-files", "action": "readArchitectureModel", "summary": "Agent reads existing JSON before editing.", "data": ["architecture-model"] },
52
+ { "id": "edit-data", "from": "llm-agent", "to": "target-data-files", "action": "updateArchitectureFacts", "summary": "Agent updates only project-owned data files and preserves stable IDs.", "data": ["architecture-model"] },
53
+ { "id": "run-validation", "from": "llm-agent", "to": "schema-validator", "action": "runArchitextValidate", "summary": "Agent runs package-owned validation before claiming completion.", "data": ["validation-output"] }
54
+ ],
55
+ "guarantees": ["Package-owned viewer/schema/tool files are not edited in target repositories."],
56
+ "failureBehavior": ["If validation fails, agent repairs JSON or reports the failure loudly."],
57
+ "observability": ["Validation result in final answer", "JSON diffs"],
58
+ "verification": ["architext prompt . --mode architecture-change", "architext validate ."],
59
+ "knownGaps": ["Generated architecture claims still require human review."]
60
+ },
61
+ {
62
+ "id": "local-review",
63
+ "name": "Local viewer review",
64
+ "status": "implemented",
65
+ "summary": "A maintainer serves the package-owned viewer against target repository data.",
66
+ "trigger": "Maintainer runs architext serve [path].",
67
+ "actors": ["maintainer"],
68
+ "steps": [
69
+ { "id": "start-server", "from": "maintainer", "to": "architext-cli", "action": "startLocalServer", "summary": "CLI starts the package-owned Vite server with target data directory configured.", "data": ["repository-metadata"] },
70
+ { "id": "serve-assets", "from": "architext-cli", "to": "viewer-runtime", "action": "servePackageViewer", "summary": "Viewer assets are served from the installed package.", "data": ["package-assets"] },
71
+ { "id": "load-data", "from": "viewer-runtime", "to": "target-data-files", "action": "fetchTargetData", "summary": "Viewer fetches /data/*.json from the selected target repository.", "data": ["architecture-model"] }
72
+ ],
73
+ "guarantees": ["Review requires a local server but not target-local npm dependencies."],
74
+ "failureBehavior": ["Missing data produces viewer load errors and doctor guidance."],
75
+ "observability": ["Browser view", "Browser console", "CLI server output"],
76
+ "verification": ["architext serve ."],
77
+ "knownGaps": ["The viewer remains a local dev server in normal review mode."]
78
+ },
79
+ {
80
+ "id": "static-export",
81
+ "name": "Static export",
82
+ "status": "implemented",
83
+ "summary": "A maintainer builds a static viewer that includes a copy of selected target data.",
84
+ "trigger": "Maintainer runs architext build [path].",
85
+ "actors": ["maintainer"],
86
+ "steps": [
87
+ { "id": "build-viewer-assets", "from": "architext-cli", "to": "viewer-runtime", "action": "buildStaticViewer", "summary": "CLI builds package-owned viewer assets into target docs/architext/dist.", "data": ["package-assets"] },
88
+ { "id": "copy-data", "from": "architext-cli", "to": "static-dist", "action": "copyTargetData", "summary": "CLI copies target data into dist/data for static serving.", "data": ["architecture-model"] }
89
+ ],
90
+ "guarantees": ["Generated static output can be served without Vite."],
91
+ "failureBehavior": ["Stale dist output is treated as generated and can be cleaned."],
92
+ "observability": ["Build output", "dist file list"],
93
+ "verification": ["architext build ."],
94
+ "knownGaps": ["Static export can become stale after data edits."]
95
+ },
96
+ {
97
+ "id": "release-packaging",
98
+ "name": "Release packaging",
99
+ "status": "implemented",
100
+ "summary": "Architext ships the global CLI, package-owned viewer, schemas, and starter templates as a major semver release.",
101
+ "trigger": "Maintainer prepares a release.",
102
+ "actors": ["maintainer"],
103
+ "steps": [
104
+ { "id": "run-build", "from": "maintainer", "to": "package-artifacts", "action": "runBuildAndValidation", "summary": "Maintainer runs validation and production build.", "data": ["package-assets", "validation-output"] },
105
+ { "id": "inspect-package", "from": "maintainer", "to": "package-artifacts", "action": "runPackageDryRun", "summary": "Maintainer verifies npm package contents exclude target generated artifacts.", "data": ["package-assets"] }
106
+ ],
107
+ "guarantees": ["1.0.0 marks the breaking distribution model change."],
108
+ "failureBehavior": ["Package contents mismatch blocks release."],
109
+ "observability": ["npm pack --dry-run output", "build output"],
110
+ "verification": ["npm pack --dry-run"],
111
+ "knownGaps": ["A CI workflow is still needed to enforce packaging checks automatically."]
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "terms": [
3
+ {
4
+ "term": "Data-only install",
5
+ "definition": "An Architext target repository layout that commits architecture JSON, lifecycle metadata, and optional instructions, but not viewer code or schemas."
6
+ },
7
+ {
8
+ "term": "Copied install",
9
+ "definition": "A pre-1.0 Architext target repository that contains copied viewer, schema, tool, package, and Vite files under docs/architext."
10
+ },
11
+ {
12
+ "term": "Package-owned runtime",
13
+ "definition": "The Architext CLI, viewer, schemas, validation tools, and starter templates shipped by the installed npm package."
14
+ },
15
+ {
16
+ "term": "Target-owned data",
17
+ "definition": "The docs/architext/data/*.json files that describe a project architecture and are reviewed as part of that project."
18
+ },
19
+ {
20
+ "term": "Managed Architext section",
21
+ "definition": "The repository-level AGENTS.md or CLAUDE.md section headed 'Architext Architecture Documentation' that the CLI can replace during migration."
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "project": {
4
+ "id": "architext",
5
+ "name": "Architext",
6
+ "summary": "Global CLI and local architecture viewer for data-only repository architecture maps."
7
+ },
8
+ "generatedAt": "2026-05-14T00:00:00.000Z",
9
+ "defaultViewId": "system-map",
10
+ "files": {
11
+ "nodes": "nodes.json",
12
+ "flows": "flows.json",
13
+ "views": "views.json",
14
+ "dataClassification": "data-classification.json",
15
+ "decisions": "decisions.json",
16
+ "risks": "risks.json",
17
+ "glossary": "glossary.json"
18
+ },
19
+ "notes": [
20
+ "This self-hosted model describes Architext itself after the 1.0 global CLI migration.",
21
+ "Target repositories own architecture data only; viewer, schemas, validation, and starter templates are package-owned."
22
+ ]
23
+ }
@@ -0,0 +1,194 @@
1
+ {
2
+ "nodes": [
3
+ {
4
+ "id": "maintainer",
5
+ "type": "actor",
6
+ "name": "Maintainer",
7
+ "summary": "Engineer installing, migrating, validating, or reviewing Architext in a repository.",
8
+ "responsibilities": ["Run lifecycle commands", "Review generated architecture data", "Keep instructions current"],
9
+ "owner": "Project maintainers",
10
+ "sourcePaths": [],
11
+ "runtime": "Terminal workflow",
12
+ "interfaces": ["architext CLI"],
13
+ "dependencies": ["architext-cli"],
14
+ "dataHandled": ["architecture-model", "repository-metadata", "agent-instructions"],
15
+ "security": ["Reviews generated changes before commit"],
16
+ "observability": ["CLI output", "Git diff"],
17
+ "relatedFlows": ["fresh-install", "copied-install-migration", "local-review"],
18
+ "relatedDecisions": ["global-cli-data-only"],
19
+ "knownRisks": ["outdated-agent-instructions"],
20
+ "verification": ["architext doctor ."]
21
+ },
22
+ {
23
+ "id": "llm-agent",
24
+ "type": "actor",
25
+ "name": "LLM Agent",
26
+ "summary": "Automation maintaining architecture JSON while changing a target repository.",
27
+ "responsibilities": ["Read architecture data before code changes", "Update data JSON when architecture changes", "Run validation"],
28
+ "owner": "Target repository workflow",
29
+ "sourcePaths": [],
30
+ "runtime": "Agent or coding assistant session",
31
+ "interfaces": ["AGENTS.md", "CLAUDE.md", "docs/architext/data/*.json"],
32
+ "dependencies": ["target-repository", "architext-cli"],
33
+ "dataHandled": ["architecture-model", "agent-instructions", "validation-output"],
34
+ "security": ["Must not edit package-owned viewer/schema/tool files in target repositories"],
35
+ "observability": ["Validation result in final response"],
36
+ "relatedFlows": ["architecture-maintenance"],
37
+ "relatedDecisions": ["managed-agent-section"],
38
+ "knownRisks": ["outdated-agent-instructions"],
39
+ "verification": ["architext prompt . --mode architecture-change"]
40
+ },
41
+ {
42
+ "id": "architext-cli",
43
+ "type": "service",
44
+ "name": "Architext CLI",
45
+ "summary": "Global Node CLI that manages installs, migrations, validation, serving, builds, prompts, and diagnostics.",
46
+ "responsibilities": ["Resolve target paths", "Write starter data", "Migrate copied installs", "Serve package viewer", "Run validation"],
47
+ "owner": "Architext maintainers",
48
+ "sourcePaths": ["tools/architext-adopt.mjs"],
49
+ "runtime": "Node.js 20+ global executable",
50
+ "interfaces": ["architext <command> [path]", "status --json"],
51
+ "dependencies": ["viewer-runtime", "schema-validator", "target-repository", "package-artifacts"],
52
+ "dataHandled": ["architecture-model", "repository-metadata", "agent-instructions", "validation-output"],
53
+ "security": ["Dry-run exposes destructive migration changes", "Architecture facts are not rewritten silently"],
54
+ "observability": ["Console output", "doctor/status JSON"],
55
+ "relatedFlows": ["fresh-install", "copied-install-migration", "local-review", "static-export"],
56
+ "relatedDecisions": ["global-cli-data-only", "safe-migration"],
57
+ "knownRisks": ["migration-data-loss", "package-runtime-drift"],
58
+ "verification": ["node tools/architext-adopt.mjs --help", "node tools/architext-adopt.mjs status . --json"]
59
+ },
60
+ {
61
+ "id": "viewer-runtime",
62
+ "type": "client",
63
+ "name": "Package-owned viewer",
64
+ "summary": "React/Vite viewer served from the installed Architext package rather than copied into target repositories.",
65
+ "responsibilities": ["Render diagrams", "Fetch target data through local server", "Support work modes and details panels"],
66
+ "owner": "Architext maintainers",
67
+ "sourcePaths": ["docs/architext/src/main.tsx", "docs/architext/src/styles.css", "docs/architext/vite.config.ts"],
68
+ "runtime": "Vite development server or built static assets",
69
+ "interfaces": ["http://127.0.0.1:4317", "/data/*.json"],
70
+ "dependencies": ["target-data-files"],
71
+ "dataHandled": ["architecture-model", "package-assets"],
72
+ "security": ["Serves local package assets only", "No runtime CDN dependency"],
73
+ "observability": ["Browser console", "Rendered diagrams"],
74
+ "relatedFlows": ["local-review", "static-export"],
75
+ "relatedDecisions": ["global-cli-data-only"],
76
+ "knownRisks": ["package-runtime-drift"],
77
+ "verification": ["architext serve .", "architext build ."]
78
+ },
79
+ {
80
+ "id": "schema-validator",
81
+ "type": "module",
82
+ "name": "Schema validator",
83
+ "summary": "AJV-based validator that checks schemas, unique IDs, and cross-file references.",
84
+ "responsibilities": ["Validate JSON Schema", "Reject unresolved references", "Report duplicate IDs"],
85
+ "owner": "Architext maintainers",
86
+ "sourcePaths": ["docs/architext/tools/validate-architext.mjs", "docs/architext/schema/*.schema.json"],
87
+ "runtime": "Node.js process invoked by CLI",
88
+ "interfaces": ["architext validate [path]", "--data-dir", "--schema-dir"],
89
+ "dependencies": ["target-data-files", "package-schemas"],
90
+ "dataHandled": ["architecture-model", "validation-output"],
91
+ "security": ["Fails closed on invalid model"],
92
+ "observability": ["Validation errors by file and reference context"],
93
+ "relatedFlows": ["fresh-install", "architecture-maintenance", "copied-install-migration"],
94
+ "relatedDecisions": ["package-owned-schemas"],
95
+ "knownRisks": ["schema-version-mismatch"],
96
+ "verification": ["architext validate ."]
97
+ },
98
+ {
99
+ "id": "target-repository",
100
+ "type": "software-system",
101
+ "name": "Target repository",
102
+ "summary": "Any project that adopts Architext and commits only architecture data, metadata, and instructions.",
103
+ "responsibilities": ["Own architecture facts", "Store lifecycle metadata", "Keep generated build output ignored"],
104
+ "owner": "Target project maintainers",
105
+ "sourcePaths": ["docs/architext/data/*.json", "docs/architext/.architext.json", "AGENTS.md", "CLAUDE.md"],
106
+ "runtime": "Git repository",
107
+ "interfaces": ["Filesystem", "Git diff", "package.json scripts"],
108
+ "dependencies": [],
109
+ "dataHandled": ["architecture-model", "repository-metadata", "agent-instructions"],
110
+ "security": ["Project instructions must remain authoritative outside the managed Architext section"],
111
+ "observability": ["Git status", "doctor output"],
112
+ "relatedFlows": ["fresh-install", "copied-install-migration", "architecture-maintenance"],
113
+ "relatedDecisions": ["global-cli-data-only"],
114
+ "knownRisks": ["outdated-agent-instructions", "migration-data-loss"],
115
+ "verification": ["architext doctor ."]
116
+ },
117
+ {
118
+ "id": "target-data-files",
119
+ "type": "data-store",
120
+ "name": "Target data files",
121
+ "summary": "Project-owned Architext JSON files committed under docs/architext/data.",
122
+ "responsibilities": ["Store nodes", "Store flows", "Store views", "Store decisions and risks"],
123
+ "owner": "Target project maintainers",
124
+ "sourcePaths": ["docs/architext/data/*.json"],
125
+ "runtime": "Version-controlled JSON",
126
+ "interfaces": ["manifest.json file map", "JSON Schema"],
127
+ "dependencies": [],
128
+ "dataHandled": ["architecture-model"],
129
+ "security": ["Reviewed as code"],
130
+ "observability": ["Validation output", "Rendered viewer"],
131
+ "relatedFlows": ["architecture-maintenance", "local-review", "static-export"],
132
+ "relatedDecisions": ["global-cli-data-only"],
133
+ "knownRisks": ["schema-version-mismatch"],
134
+ "verification": ["architext validate ."]
135
+ },
136
+ {
137
+ "id": "package-schemas",
138
+ "type": "module",
139
+ "name": "Package schemas",
140
+ "summary": "Architext-owned JSON Schemas shipped with the global package.",
141
+ "responsibilities": ["Define data contract", "Provide validation source of truth"],
142
+ "owner": "Architext maintainers",
143
+ "sourcePaths": ["docs/architext/schema/*.schema.json"],
144
+ "runtime": "Package files",
145
+ "interfaces": ["JSON Schema 2020-12"],
146
+ "dependencies": [],
147
+ "dataHandled": ["package-assets"],
148
+ "security": ["Schemas are not target-repository-owned"],
149
+ "observability": ["npm pack --dry-run"],
150
+ "relatedFlows": ["architecture-maintenance", "copied-install-migration"],
151
+ "relatedDecisions": ["package-owned-schemas"],
152
+ "knownRisks": ["schema-version-mismatch"],
153
+ "verification": ["npm pack --dry-run"]
154
+ },
155
+ {
156
+ "id": "package-artifacts",
157
+ "type": "deployment-unit",
158
+ "name": "NPM package artifacts",
159
+ "summary": "Published files that include CLI code, viewer source/assets, schemas, starter templates, and documentation.",
160
+ "responsibilities": ["Distribute global CLI", "Bundle local runtime dependencies", "Exclude target generated artifacts"],
161
+ "owner": "Architext maintainers",
162
+ "sourcePaths": ["package.json", "package-lock.json", "docs/architext", "tools"],
163
+ "runtime": "npm package",
164
+ "interfaces": ["npm install -g @robotaccomplice/architext", "npm pack --dry-run"],
165
+ "dependencies": ["architext-cli", "viewer-runtime", "package-schemas"],
166
+ "dataHandled": ["package-assets"],
167
+ "security": ["Package contents are reviewed before release"],
168
+ "observability": ["npm pack file list"],
169
+ "relatedFlows": ["release-packaging"],
170
+ "relatedDecisions": ["major-version-release"],
171
+ "knownRisks": ["package-runtime-drift"],
172
+ "verification": ["npm pack --dry-run"]
173
+ },
174
+ {
175
+ "id": "static-dist",
176
+ "type": "deployment-unit",
177
+ "name": "Static viewer export",
178
+ "summary": "Generated static viewer output for offline or tiny-server review.",
179
+ "responsibilities": ["Contain built viewer assets", "Include a copy of selected target data"],
180
+ "owner": "Target project maintainers",
181
+ "sourcePaths": ["docs/architext/dist"],
182
+ "runtime": "Static files served by any local HTTP server",
183
+ "interfaces": ["architext build [path]", "python3 -m http.server"],
184
+ "dependencies": ["viewer-runtime", "target-data-files"],
185
+ "dataHandled": ["architecture-model", "package-assets"],
186
+ "security": ["Generated artifact should remain ignored unless intentionally published"],
187
+ "observability": ["Build output", "Static server logs"],
188
+ "relatedFlows": ["static-export"],
189
+ "relatedDecisions": ["global-cli-data-only"],
190
+ "knownRisks": ["stale-static-export"],
191
+ "verification": ["architext build ."]
192
+ }
193
+ ]
194
+ }