archledger 0.1.0__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.
- archledger-0.1.0/.archledger/records/building_blocks/al_0041.md +47 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0042.md +36 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0043.md +32 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0044.md +26 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0045.md +33 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0046.md +33 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0047.md +27 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0048.md +28 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0049.md +32 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0050.md +32 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0051.md +32 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0052.md +26 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0053.md +34 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0054.md +36 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0055.md +30 -0
- archledger-0.1.0/.archledger/records/building_blocks/al_0056.md +27 -0
- archledger-0.1.0/.archledger/records/concepts/al_0071.md +19 -0
- archledger-0.1.0/.archledger/records/concepts/al_0072.md +22 -0
- archledger-0.1.0/.archledger/records/concepts/al_0073.md +22 -0
- archledger-0.1.0/.archledger/records/concepts/al_0074.md +20 -0
- archledger-0.1.0/.archledger/records/concepts/al_0075.md +31 -0
- archledger-0.1.0/.archledger/records/constraints/al_0029.md +21 -0
- archledger-0.1.0/.archledger/records/constraints/al_0030.md +22 -0
- archledger-0.1.0/.archledger/records/constraints/al_0031.md +21 -0
- archledger-0.1.0/.archledger/records/constraints/al_0032.md +21 -0
- archledger-0.1.0/.archledger/records/constraints/al_0033.md +21 -0
- archledger-0.1.0/.archledger/records/contexts/al_0034.md +26 -0
- archledger-0.1.0/.archledger/records/contexts/al_0036.md +28 -0
- archledger-0.1.0/.archledger/records/contexts/al_0037.md +27 -0
- archledger-0.1.0/.archledger/records/contexts/al_0038.md +32 -0
- archledger-0.1.0/.archledger/records/decisions/al_0077.md +44 -0
- archledger-0.1.0/.archledger/records/decisions/al_0078.md +42 -0
- archledger-0.1.0/.archledger/records/decisions/al_0079.md +42 -0
- archledger-0.1.0/.archledger/records/decisions/al_0080.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0081.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0082.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0083.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0084.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0085.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0086.md +38 -0
- archledger-0.1.0/.archledger/records/decisions/al_0087.md +45 -0
- archledger-0.1.0/.archledger/records/deployment/al_0064.md +25 -0
- archledger-0.1.0/.archledger/records/deployment/al_0065.md +23 -0
- archledger-0.1.0/.archledger/records/deployment/al_0066.md +23 -0
- archledger-0.1.0/.archledger/records/deployment/al_0067.md +23 -0
- archledger-0.1.0/.archledger/records/deployment/al_0068.md +23 -0
- archledger-0.1.0/.archledger/records/deployment/al_0069.md +23 -0
- archledger-0.1.0/.archledger/records/deployment/al_0070.md +23 -0
- archledger-0.1.0/.archledger/records/diagrams/al_0035.md +48 -0
- archledger-0.1.0/.archledger/records/diagrams/al_0040.md +71 -0
- archledger-0.1.0/.archledger/records/diagrams/al_0059.md +48 -0
- archledger-0.1.0/.archledger/records/diagrams/al_0063.md +58 -0
- archledger-0.1.0/.archledger/records/diagrams/al_0076.md +60 -0
- archledger-0.1.0/.archledger/records/glossary/al_0105.md +22 -0
- archledger-0.1.0/.archledger/records/glossary/al_0106.md +23 -0
- archledger-0.1.0/.archledger/records/glossary/al_0107.md +21 -0
- archledger-0.1.0/.archledger/records/glossary/al_0108.md +21 -0
- archledger-0.1.0/.archledger/records/glossary/al_0109.md +21 -0
- archledger-0.1.0/.archledger/records/glossary/al_0110.md +21 -0
- archledger-0.1.0/.archledger/records/glossary/al_0111.md +20 -0
- archledger-0.1.0/.archledger/records/quality_goals/al_0013.md +20 -0
- archledger-0.1.0/.archledger/records/quality_goals/al_0016.md +20 -0
- archledger-0.1.0/.archledger/records/quality_goals/al_0019.md +21 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0088.md +30 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0090.md +29 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0092.md +29 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0094.md +29 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0096.md +29 -0
- archledger-0.1.0/.archledger/records/quality_requirements/al_0098.md +29 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0089.md +23 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0091.md +25 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0093.md +25 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0095.md +25 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0097.md +27 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0099.md +27 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0100.md +27 -0
- archledger-0.1.0/.archledger/records/quality_scenarios/al_0101.md +27 -0
- archledger-0.1.0/.archledger/records/requirements/al_0014.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0017.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0020.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0022.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0023.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0024.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0025.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0026.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0027.md +29 -0
- archledger-0.1.0/.archledger/records/requirements/al_0028.md +29 -0
- archledger-0.1.0/.archledger/records/risks/al_0102.md +23 -0
- archledger-0.1.0/.archledger/records/risks/al_0103.md +27 -0
- archledger-0.1.0/.archledger/records/risks/al_0104.md +23 -0
- archledger-0.1.0/.archledger/records/runtime/al_0057.md +34 -0
- archledger-0.1.0/.archledger/records/runtime/al_0058.md +29 -0
- archledger-0.1.0/.archledger/records/runtime/al_0060.md +31 -0
- archledger-0.1.0/.archledger/records/runtime/al_0061.md +33 -0
- archledger-0.1.0/.archledger/records/runtime/al_0062.md +30 -0
- archledger-0.1.0/.archledger/records/stakeholders/al_0015.md +22 -0
- archledger-0.1.0/.archledger/records/stakeholders/al_0018.md +21 -0
- archledger-0.1.0/.archledger/records/stakeholders/al_0021.md +22 -0
- archledger-0.1.0/.archledger/records/strategy/al_0039.md +37 -0
- archledger-0.1.0/.archledger/sections/al_0001.md +29 -0
- archledger-0.1.0/.archledger/sections/al_0002.md +13 -0
- archledger-0.1.0/.archledger/sections/al_0003.md +15 -0
- archledger-0.1.0/.archledger/sections/al_0004.md +17 -0
- archledger-0.1.0/.archledger/sections/al_0005.md +15 -0
- archledger-0.1.0/.archledger/sections/al_0006.md +15 -0
- archledger-0.1.0/.archledger/sections/al_0007.md +15 -0
- archledger-0.1.0/.archledger/sections/al_0008.md +15 -0
- archledger-0.1.0/.archledger/sections/al_0009.md +13 -0
- archledger-0.1.0/.archledger/sections/al_0010.md +13 -0
- archledger-0.1.0/.archledger/sections/al_0011.md +13 -0
- archledger-0.1.0/.archledger/sections/al_0012.md +13 -0
- archledger-0.1.0/.archledger/source-state.json +406 -0
- archledger-0.1.0/.archledger/storage.yaml +5 -0
- archledger-0.1.0/.archledger.toml +52 -0
- archledger-0.1.0/.codecrate.toml +26 -0
- archledger-0.1.0/.github/workflows/codecov.yml +20 -0
- archledger-0.1.0/.github/workflows/pre-commit.yml +31 -0
- archledger-0.1.0/.github/workflows/python-publish.yml +39 -0
- archledger-0.1.0/.github/workflows/tests.yml +20 -0
- archledger-0.1.0/.gitignore +221 -0
- archledger-0.1.0/.pre-commit-config.yaml +66 -0
- archledger-0.1.0/.readthedocs.yaml +23 -0
- archledger-0.1.0/.ruff.toml +26 -0
- archledger-0.1.0/.taskledger.toml +71 -0
- archledger-0.1.0/ARCHITECTURE.md +950 -0
- archledger-0.1.0/CHANGELOG.md +53 -0
- archledger-0.1.0/LICENSE +201 -0
- archledger-0.1.0/PKG-INFO +473 -0
- archledger-0.1.0/README.md +426 -0
- archledger-0.1.0/archledger/__init__.py +8 -0
- archledger-0.1.0/archledger/_version.py +24 -0
- archledger-0.1.0/archledger/assembly.py +236 -0
- archledger-0.1.0/archledger/checks.py +404 -0
- archledger-0.1.0/archledger/cli.py +929 -0
- archledger-0.1.0/archledger/cli_formatting.py +257 -0
- archledger-0.1.0/archledger/cli_payloads.py +408 -0
- archledger-0.1.0/archledger/config/__init__.py +32 -0
- archledger-0.1.0/archledger/config/model.py +233 -0
- archledger-0.1.0/archledger/config/parse.py +662 -0
- archledger-0.1.0/archledger/config/render.py +238 -0
- archledger-0.1.0/archledger/conversion_plan.py +273 -0
- archledger-0.1.0/archledger/converters.py +165 -0
- archledger-0.1.0/archledger/diagrams.py +217 -0
- archledger-0.1.0/archledger/dialects.py +105 -0
- archledger-0.1.0/archledger/errors.py +34 -0
- archledger-0.1.0/archledger/formats.py +136 -0
- archledger-0.1.0/archledger/ids.py +38 -0
- archledger-0.1.0/archledger/launcher.py +7 -0
- archledger-0.1.0/archledger/migration.py +176 -0
- archledger-0.1.0/archledger/model.py +339 -0
- archledger-0.1.0/archledger/py.typed +0 -0
- archledger-0.1.0/archledger/record_types.py +333 -0
- archledger-0.1.0/archledger/render.py +72 -0
- archledger-0.1.0/archledger/repository.py +1054 -0
- archledger-0.1.0/archledger/section_rendering.py +389 -0
- archledger-0.1.0/archledger/source_refs.py +197 -0
- archledger-0.1.0/archledger/source_tracking.py +482 -0
- archledger-0.1.0/archledger/storage/__init__.py +1 -0
- archledger-0.1.0/archledger/storage/common.py +50 -0
- archledger-0.1.0/archledger/storage/frontmatter.py +81 -0
- archledger-0.1.0/archledger/storage/meta.py +130 -0
- archledger-0.1.0/archledger/storage/paths.py +151 -0
- archledger-0.1.0/archledger/storage/project_config.py +33 -0
- archledger-0.1.0/archledger/storage/source_state.py +149 -0
- archledger-0.1.0/archledger/templates/__init__.py +1 -0
- archledger-0.1.0/archledger/templates/arc42_document.adoc.j2 +124 -0
- archledger-0.1.0/archledger/templates/arc42_document.md.j2 +120 -0
- archledger-0.1.0/archledger/templates/records/adr.adoc.j2 +37 -0
- archledger-0.1.0/archledger/templates/records/adr.md.j2 +33 -0
- archledger-0.1.0/archledger/templates/records/black_box.adoc.j2 +22 -0
- archledger-0.1.0/archledger/templates/records/black_box.md.j2 +22 -0
- archledger-0.1.0/archledger/templates/records/concept.adoc.j2 +16 -0
- archledger-0.1.0/archledger/templates/records/concept.md.j2 +16 -0
- archledger-0.1.0/archledger/templates/records/constraint.adoc.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/constraint.md.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/context_interface.adoc.j2 +20 -0
- archledger-0.1.0/archledger/templates/records/context_interface.md.j2 +20 -0
- archledger-0.1.0/archledger/templates/records/diagram.adoc.j2 +46 -0
- archledger-0.1.0/archledger/templates/records/diagram.md.j2 +43 -0
- archledger-0.1.0/archledger/templates/records/glossary_term.adoc.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/glossary_term.md.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/infrastructure.adoc.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/infrastructure.md.j2 +19 -0
- archledger-0.1.0/archledger/templates/records/interface.adoc.j2 +18 -0
- archledger-0.1.0/archledger/templates/records/interface.md.j2 +19 -0
- archledger-0.1.0/archledger/templates/records/quality_goal.adoc.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/quality_goal.md.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/quality_requirement.adoc.j2 +27 -0
- archledger-0.1.0/archledger/templates/records/quality_requirement.md.j2 +25 -0
- archledger-0.1.0/archledger/templates/records/quality_scenario.adoc.j2 +22 -0
- archledger-0.1.0/archledger/templates/records/quality_scenario.md.j2 +22 -0
- archledger-0.1.0/archledger/templates/records/requirement.adoc.j2 +27 -0
- archledger-0.1.0/archledger/templates/records/requirement.md.j2 +25 -0
- archledger-0.1.0/archledger/templates/records/risk.adoc.j2 +18 -0
- archledger-0.1.0/archledger/templates/records/risk.md.j2 +18 -0
- archledger-0.1.0/archledger/templates/records/runtime_scenario.adoc.j2 +18 -0
- archledger-0.1.0/archledger/templates/records/runtime_scenario.md.j2 +18 -0
- archledger-0.1.0/archledger/templates/records/stakeholder.adoc.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/stakeholder.md.j2 +17 -0
- archledger-0.1.0/archledger/templates/records/strategy_item.adoc.j2 +26 -0
- archledger-0.1.0/archledger/templates/records/strategy_item.md.j2 +24 -0
- archledger-0.1.0/archledger/templates/records/white_box.adoc.j2 +33 -0
- archledger-0.1.0/archledger/templates/records/white_box.md.j2 +30 -0
- archledger-0.1.0/archledger.egg-info/PKG-INFO +473 -0
- archledger-0.1.0/archledger.egg-info/SOURCES.txt +242 -0
- archledger-0.1.0/archledger.egg-info/dependency_links.txt +1 -0
- archledger-0.1.0/archledger.egg-info/entry_points.txt +2 -0
- archledger-0.1.0/archledger.egg-info/requires.txt +22 -0
- archledger-0.1.0/archledger.egg-info/top_level.txt +1 -0
- archledger-0.1.0/docs/Makefile +33 -0
- archledger-0.1.0/docs/agent-workflow.rst +20 -0
- archledger-0.1.0/docs/api.rst +14 -0
- archledger-0.1.0/docs/build-and-export.rst +75 -0
- archledger-0.1.0/docs/build.sh +57 -0
- archledger-0.1.0/docs/cli.rst +58 -0
- archledger-0.1.0/docs/conf.py +60 -0
- archledger-0.1.0/docs/configuration.rst +54 -0
- archledger-0.1.0/docs/index.rst +22 -0
- archledger-0.1.0/docs/release-process.rst +72 -0
- archledger-0.1.0/docs/requirements.txt +3 -0
- archledger-0.1.0/docs/source-model.rst +32 -0
- archledger-0.1.0/docs/source-tracking.rst +68 -0
- archledger-0.1.0/pyproject.toml +116 -0
- archledger-0.1.0/setup.cfg +4 -0
- archledger-0.1.0/skills/archledger/SKILL.md +220 -0
- archledger-0.1.0/tests/__init__.py +0 -0
- archledger-0.1.0/tests/test_build.py +498 -0
- archledger-0.1.0/tests/test_build_formats.py +594 -0
- archledger-0.1.0/tests/test_converter_integration.py +43 -0
- archledger-0.1.0/tests/test_diagrams.py +445 -0
- archledger-0.1.0/tests/test_frontmatter.py +81 -0
- archledger-0.1.0/tests/test_ids.py +55 -0
- archledger-0.1.0/tests/test_init_cli.py +270 -0
- archledger-0.1.0/tests/test_migration.py +336 -0
- archledger-0.1.0/tests/test_paths.py +668 -0
- archledger-0.1.0/tests/test_read_cli.py +120 -0
- archledger-0.1.0/tests/test_repository_cli.py +1080 -0
- archledger-0.1.0/tests/test_section_rendering.py +77 -0
- archledger-0.1.0/tests/test_skill_file.py +33 -0
- archledger-0.1.0/tests/test_source_tracking.py +291 -0
- archledger-0.1.0/tests/test_storage_common.py +15 -0
- archledger-0.1.0/tests/test_storage_meta.py +57 -0
- archledger-0.1.0/tests/test_templates.py +183 -0
- archledger-0.1.0/tools/migrate_archledger_fixture_ids.py +127 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0041
|
|
3
|
+
type: white_box
|
|
4
|
+
title: Overall System
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-21"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: null
|
|
12
|
+
order: 10
|
|
13
|
+
diagram: null
|
|
14
|
+
quality_characteristics: []
|
|
15
|
+
tags: []
|
|
16
|
+
created_at: "2026-05-20T05:52:14Z"
|
|
17
|
+
updated_at: "2026-05-22T07:00:00Z"
|
|
18
|
+
source_refs:
|
|
19
|
+
- path: archledger/
|
|
20
|
+
reason: All source code under the archledger package
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Motivation
|
|
24
|
+
|
|
25
|
+
archledger is decomposed into fifteen black boxes organized as a layered pipeline: the CLI accepts user input and delegates output formatting, the Config layer parses and renders project configuration, the Repository orchestrates business logic, the Model layer defines core data structures, the Record Type Registry maps record types to templates and defaults, the Check layer validates record content per type, the Source Ref Validation layer normalizes traceability links, the Storage layer handles file I/O, the Assembly layer renders the document, the Dialect layer abstracts format-specific markup, the Section Rendering layer handles per-record-type output, the Render layer orchestrates the build pipeline, the Converter layer handles multi-format export, the Source Tracking layer detects changes and impacts, and the Migration layer converts between source dialects.
|
|
26
|
+
|
|
27
|
+
## Contained building blocks
|
|
28
|
+
|
|
29
|
+
- **CLI Layer** (`cli.py`, `cli_formatting.py`, `cli_payloads.py`, `launcher.py`): Typer-based command-line interface with 11 top-level commands and a `source` subgroup (snapshot, changed, convert), JSON payload construction, and human-readable output formatting
|
|
30
|
+
- **Config Layer** (`config/`): Project configuration model, TOML parsing, default config rendering
|
|
31
|
+
- **Repository Layer** (`repository.py`): Business logic orchestration for init, create, list, check, status
|
|
32
|
+
- **Model Layer** (`model.py`, `errors.py`): Core data structures, validation constants, record lifecycle
|
|
33
|
+
- **Record Type Registry** (`record_types.py`): Record type specifications, directory/template/section mappings, CLI kind aliases
|
|
34
|
+
- **Check Layer** (`checks.py`): Per-record-type content validation including multi-type diagram validation (text/ascii/unicode/svgbob/mermaid) with dialect-specific block detection and line-length checks
|
|
35
|
+
- **Source Ref Validation** (`source_refs.py`): Traceability link normalization and path validation
|
|
36
|
+
- **Storage Layer** (`storage/`): File system access, front matter parsing, source state persistence
|
|
37
|
+
- **Assembly Layer** (`assembly.py`): Jinja2-based document assembly from records and sections
|
|
38
|
+
- **Dialect Layer** (`dialects.py`): Format-neutral markup abstraction (Markdown, AsciiDoc)
|
|
39
|
+
- **Section Rendering Layer** (`section_rendering.py`): Per-record-type rendering via dialects
|
|
40
|
+
- **Render Layer** (`render.py`): Build pipeline facade
|
|
41
|
+
- **Converter Layer** (`converters.py`, `conversion_plan.py`, `formats.py`): Multi-format export planning and execution via pandoc/asciidoctor
|
|
42
|
+
- **Source Tracking Layer** (`source_tracking.py`, `storage/source_state.py`): Change detection and impact analysis
|
|
43
|
+
- **Migration Layer** (`migration.py`): Source dialect conversion (Markdown to AsciiDoc)
|
|
44
|
+
|
|
45
|
+
## Important interfaces
|
|
46
|
+
|
|
47
|
+
The primary interface is the CLI (`archledger` console script). The CLI delegates to `cli_payloads.py` for JSON output construction and `cli_formatting.py` for human-readable messages. Internally, the Repository exposes methods that the CLI calls, and the Repository delegates to Storage, Model, Record Type Registry, Check, and Source Ref Validation. Config parsing is handled by the Config Layer independently from Storage. The Render Layer delegates to Assembly and Converters. The Converter Layer uses `conversion_plan.py` to plan each format conversion. Source Tracking is used by the CLI `source` subgroup for snapshot/changed/convert commands.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0042
|
|
3
|
+
type: black_box
|
|
4
|
+
title: CLI Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-21"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 10
|
|
13
|
+
interfaces:
|
|
14
|
+
- archledger console script (stdin/stdout)
|
|
15
|
+
location:
|
|
16
|
+
- archledger/cli.py
|
|
17
|
+
- archledger/cli_formatting.py
|
|
18
|
+
- archledger/cli_payloads.py
|
|
19
|
+
- archledger/launcher.py
|
|
20
|
+
fulfilled_requirements: []
|
|
21
|
+
risks: []
|
|
22
|
+
tags: []
|
|
23
|
+
created_at: "2026-05-20T05:52:14Z"
|
|
24
|
+
updated_at: "2026-05-21T16:00:00Z"
|
|
25
|
+
source_refs:
|
|
26
|
+
- archledger/cli.py
|
|
27
|
+
- archledger/cli_formatting.py
|
|
28
|
+
- archledger/cli_payloads.py
|
|
29
|
+
- archledger/launcher.py
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
The Typer-based CLI exposes top-level commands: `init`, `status`, `paths`, `schema`, `new`, `seed`, `list`, `show`, `read`, `check`, `build`, and the `source` subgroup. The `source` subgroup contains `snapshot`, `changed`, and `convert` for source tracking and dialect migration. Each command resolves the project config, constructs a Repository, and delegates to it. Two output modes are supported: human-readable text (default) and structured JSON (`--json` flag). Error handling maps domain exceptions (`ArchledgerError` subclasses) to appropriate exit codes and error output.
|
|
33
|
+
|
|
34
|
+
Output is split across three modules: `cli.py` defines Typer commands and dispatches to the Repository, `cli_payloads.py` constructs structured JSON dictionaries from domain result types, and `cli_formatting.py` renders human-readable messages from those payloads. This separation keeps the command definitions thin and testable.
|
|
35
|
+
|
|
36
|
+
The `source snapshot` and `source changed` commands integrate the source tracking subsystem. The `source convert` command delegates to the migration module for Markdown-to-AsciiDoc source conversion.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0043
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Repository Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 20
|
|
13
|
+
interfaces:
|
|
14
|
+
- create_record()
|
|
15
|
+
- list_records()
|
|
16
|
+
- get_record()
|
|
17
|
+
- load_all_records()
|
|
18
|
+
- check()
|
|
19
|
+
- init()
|
|
20
|
+
- status()
|
|
21
|
+
location:
|
|
22
|
+
- archledger/repository.py
|
|
23
|
+
fulfilled_requirements: []
|
|
24
|
+
risks: []
|
|
25
|
+
tags: []
|
|
26
|
+
created_at: "2026-05-20T05:52:15Z"
|
|
27
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
28
|
+
source_refs:
|
|
29
|
+
- archledger/repository.py
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
The `ArchitectureRepository` class is the central business logic layer. It orchestrates record creation (allocating IDs via the Record Type Registry, rendering templates, writing files), record loading (parsing front matter, validating fields, normalizing source refs via the Source Ref Validation layer), integrity checks (delegating per-record-type content warnings to the Check Layer, plus cross-reference validation and source contract validation), and initialization (directory scaffolding, section file generation). It holds a Jinja2 environment for template rendering.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0044
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Render Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 30
|
|
13
|
+
interfaces:
|
|
14
|
+
- build_document()
|
|
15
|
+
location:
|
|
16
|
+
- archledger/render.py
|
|
17
|
+
fulfilled_requirements: []
|
|
18
|
+
risks: []
|
|
19
|
+
tags: []
|
|
20
|
+
created_at: "2026-05-20T05:52:15Z"
|
|
21
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
22
|
+
source_refs:
|
|
23
|
+
- archledger/render.py
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
The render module (`render.py`) is a thin facade that orchestrates the build pipeline. It resolves requested output formats via the formats module, delegates document assembly to the Assembly Layer, and then delegates multi-format conversion to the Converter Layer. The actual rendering logic is split across the Assembly Layer (template orchestration) and the Section Rendering Layer (per-record-type output).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0045
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Storage Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 40
|
|
13
|
+
interfaces:
|
|
14
|
+
- read_text() / write_text()
|
|
15
|
+
- read_markdown_front_matter()
|
|
16
|
+
- resolve_project_paths()
|
|
17
|
+
- read_source_state() / write_source_state()
|
|
18
|
+
location:
|
|
19
|
+
- archledger/storage/common.py
|
|
20
|
+
- archledger/storage/frontmatter.py
|
|
21
|
+
- archledger/storage/meta.py
|
|
22
|
+
- archledger/storage/paths.py
|
|
23
|
+
- archledger/storage/source_state.py
|
|
24
|
+
fulfilled_requirements: []
|
|
25
|
+
risks: []
|
|
26
|
+
tags: []
|
|
27
|
+
created_at: "2026-05-20T05:52:15Z"
|
|
28
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
29
|
+
source_refs:
|
|
30
|
+
- archledger/storage/
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
The storage subpackage handles all file system I/O. `paths.py` discovers the project config and resolves directory layout (including `source_state_path` for tracking baselines). `project_config.py` holds the `ProjectConfig` dataclass with all configuration fields (source, build, arc42, skill, tracking). Config parsing and TOML loading now lives in the Config Layer (`config/` subpackage). `frontmatter.py` parses Markdown/AsciiDoc files with YAML front matter into metadata dict and body string, and provides `iter_source_files` for directory enumeration. `meta.py` manages the storage metadata file (`storage.yaml`). `source_state.py` reads and writes source tracking state as JSON. `common.py` provides `write_text`, `read_text`, `ensure_dir`, and `utc_now_iso`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0046
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Model Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 50
|
|
13
|
+
interfaces:
|
|
14
|
+
- ArchitectureRecord dataclass
|
|
15
|
+
- SourceRef dataclass
|
|
16
|
+
- validate_record()
|
|
17
|
+
- filename_for()
|
|
18
|
+
- record_sort_key()
|
|
19
|
+
- normalize_kind()
|
|
20
|
+
location:
|
|
21
|
+
- archledger/model.py
|
|
22
|
+
- archledger/errors.py
|
|
23
|
+
fulfilled_requirements: []
|
|
24
|
+
risks: []
|
|
25
|
+
tags: []
|
|
26
|
+
created_at: "2026-05-20T05:52:16Z"
|
|
27
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
28
|
+
source_refs:
|
|
29
|
+
- archledger/model.py
|
|
30
|
+
- archledger/errors.py
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
The model module defines the core data structures and validation rules. `ArchitectureRecord` is a frozen dataclass holding id, type, title, status, section, order, path, metadata, body, and source_refs. `SourceRef` holds path, symbols, and reason for traceability linking. `validate_record()` checks field types, status values, and ID/filename consistency. Constants for valid formats, status values, and file extension mappings remain in `model.py`. Record type to directory/template/section mappings have been extracted to the Record Type Registry (`record_types.py`). Source ref validation and normalization have been extracted to the Source Ref Validation layer (`source_refs.py`). The `errors.py` module defines the exception hierarchy: `ArchledgerError` base with `ConfigError`, `StorageError`, `FrontMatterError`, `ValidationError`, and `RenderError` subclasses.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0047
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Assembly Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 60
|
|
13
|
+
interfaces:
|
|
14
|
+
- assemble_document()
|
|
15
|
+
- assemble_asciidoc_document()
|
|
16
|
+
location:
|
|
17
|
+
- archledger/assembly.py
|
|
18
|
+
fulfilled_requirements: []
|
|
19
|
+
risks: []
|
|
20
|
+
tags: []
|
|
21
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
22
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
23
|
+
source_refs:
|
|
24
|
+
- archledger/assembly.py
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
The assembly module loads all records from the repository, groups them by arc42 section, filters by visibility, selects the correct dialect, and renders a single document using a Jinja2 template (`arc42_document.md.j2` or `arc42_document.adoc.j2`). It delegates to the Section Rendering Layer for per-record-type output formatting. The assembly runs a check first and blocks the build if errors are found.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0048
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Dialect Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 70
|
|
13
|
+
interfaces:
|
|
14
|
+
- get_dialect()
|
|
15
|
+
- Dialect base class
|
|
16
|
+
- MarkdownDialect / AsciiDocDialect
|
|
17
|
+
location:
|
|
18
|
+
- archledger/dialects.py
|
|
19
|
+
fulfilled_requirements: []
|
|
20
|
+
risks: []
|
|
21
|
+
tags: []
|
|
22
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
23
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
24
|
+
source_refs:
|
|
25
|
+
- archledger/dialects.py
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
The dialects module provides a format-neutral abstraction for document rendering. The `Dialect` base class defines methods for headings, tables, bullets, and strong text. `MarkdownDialect` and `AsciiDocDialect` implement these using the respective markup conventions (e.g., `#` vs `=` for headings, `|...|` vs `|===` tables). Both the Assembly Layer and Section Rendering Layer use dialects to produce format-correct output without conditional branching.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0049
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Section Rendering Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 75
|
|
13
|
+
interfaces:
|
|
14
|
+
- section_body()
|
|
15
|
+
- building_block_hierarchy()
|
|
16
|
+
- adr_sections()
|
|
17
|
+
- quality_scenarios()
|
|
18
|
+
- risk_table()
|
|
19
|
+
- glossary_table()
|
|
20
|
+
- (and other per-type renderers)
|
|
21
|
+
location:
|
|
22
|
+
- archledger/section_rendering.py
|
|
23
|
+
fulfilled_requirements: []
|
|
24
|
+
risks: []
|
|
25
|
+
tags: []
|
|
26
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
27
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
28
|
+
source_refs:
|
|
29
|
+
- archledger/section_rendering.py
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
The section rendering module contains all per-record-type rendering functions. Each function takes a list of `ArchitectureRecord` and a `Dialect`, and returns a format-appropriate string (Markdown or AsciiDoc). Functions include table renderers (quality goals, stakeholders, quality scenarios, risks, glossary), list renderers (constraints, context interfaces), hierarchy renderers (building blocks with white/black boxes and interfaces), and prose renderers (ADRs, runtime scenarios, deployment, concepts, strategy items).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0050
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Converter Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 80
|
|
13
|
+
interfaces:
|
|
14
|
+
- convert_assembled_document()
|
|
15
|
+
location:
|
|
16
|
+
- archledger/converters.py
|
|
17
|
+
- archledger/conversion_plan.py
|
|
18
|
+
- archledger/formats.py
|
|
19
|
+
fulfilled_requirements: []
|
|
20
|
+
risks: []
|
|
21
|
+
tags: []
|
|
22
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
23
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
24
|
+
source_refs:
|
|
25
|
+
- archledger/converters.py
|
|
26
|
+
- archledger/conversion_plan.py
|
|
27
|
+
- archledger/formats.py
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
The converter module handles multi-format export. It takes an assembled document (from the Assembly Layer) and produces output in the requested formats. For native format builds (Markdown source to Markdown output, or AsciiDoc source to AsciiDoc output), it does a direct file copy. For other formats, it invokes external converters: pandoc for Markdown-to-HTML/PDF/DOCX/RST/Textile, asciidoctor for AsciiDoc-to-HTML/PDF (direct or via DocBook intermediate), and pandoc for AsciiDoc-to-DOCX/Markdown/RST/Textile (via DocBook). The formats module (`formats.py`) defines the `OutputFormat` enum and resolves requested formats from CLI options and config.
|
|
31
|
+
|
|
32
|
+
Conversion planning is handled by `conversion_plan.py`, which produces a `ConversionPlan` dataclass for each requested format. Each plan specifies whether the conversion is a native copy, a direct tool invocation, or requires a DocBook intermediate step. Tool resolution uses `shutil.which` by default. The `require_tool()` function raises `RenderError` with install hints when a required converter is unavailable. DocBook intermediates are cleaned up unless `build_keep_intermediate` is set.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0051
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Source Tracking Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 90
|
|
13
|
+
interfaces:
|
|
14
|
+
- scan_workspace()
|
|
15
|
+
- diff_source_states()
|
|
16
|
+
- resolve_impacts()
|
|
17
|
+
location:
|
|
18
|
+
- archledger/source_tracking.py
|
|
19
|
+
- archledger/storage/source_state.py
|
|
20
|
+
fulfilled_requirements: []
|
|
21
|
+
risks: []
|
|
22
|
+
tags: []
|
|
23
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
24
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
25
|
+
source_refs:
|
|
26
|
+
- archledger/source_tracking.py
|
|
27
|
+
- archledger/storage/source_state.py
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
The source tracking module detects changes between a baseline snapshot and the current workspace state. `scan_workspace` enumerates tracked files using git or filesystem scanning, computes SHA-256 content hashes, and stores SHA-256-only file entries. It also derives directory hashes and file counts from the scanned file tree. `diff_source_states` compares two snapshots to produce a `ChangeSet` listing added, modified, and deleted files with possible rename detection. `resolve_impacts` cross-references changed files with architecture record `source_refs` to identify impacted records and unlinked changed files.
|
|
31
|
+
|
|
32
|
+
The storage sub-module (`storage/source_state.py`) handles JSON serialization and deserialization of the source state, persisted alongside `storage.yaml`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0052
|
|
3
|
+
type: black_box
|
|
4
|
+
title: Migration Layer
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-20"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: building_block_view
|
|
10
|
+
level: 1
|
|
11
|
+
parent: al_0041
|
|
12
|
+
order: 95
|
|
13
|
+
interfaces:
|
|
14
|
+
- convert_sources()
|
|
15
|
+
location:
|
|
16
|
+
- archledger/migration.py
|
|
17
|
+
fulfilled_requirements: []
|
|
18
|
+
risks: []
|
|
19
|
+
tags: []
|
|
20
|
+
created_at: "2026-05-20T12:00:00Z"
|
|
21
|
+
updated_at: "2026-05-20T12:00:00Z"
|
|
22
|
+
source_refs:
|
|
23
|
+
- archledger/migration.py
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
The migration module converts source fragments from one dialect to another. Currently supports Markdown-to-AsciiDoc conversion. It iterates over all section and record files, converts the body using pandoc (falling back to keeping the original body if pandoc is unavailable), updates the YAML front matter to reflect the new body format, and optionally replaces the original files. It also rewrites the project config to target the new source format.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
id: al_0053
|
|
4
|
+
type: black_box
|
|
5
|
+
title: Config Layer
|
|
6
|
+
status: accepted
|
|
7
|
+
section: building_block_view
|
|
8
|
+
level: 1
|
|
9
|
+
parent: al_0041
|
|
10
|
+
order: 105
|
|
11
|
+
date: "2026-05-21"
|
|
12
|
+
interfaces:
|
|
13
|
+
- load_project_config()
|
|
14
|
+
- render_default_config()
|
|
15
|
+
- ProjectConfig dataclass
|
|
16
|
+
location:
|
|
17
|
+
- archledger/config/__init__.py
|
|
18
|
+
- archledger/config/model.py
|
|
19
|
+
- archledger/config/parse.py
|
|
20
|
+
- archledger/config/render.py
|
|
21
|
+
fulfilled_requirements: []
|
|
22
|
+
risks: []
|
|
23
|
+
tags: []
|
|
24
|
+
body_format: markdown
|
|
25
|
+
created_at: "2026-05-21T11:30:43Z"
|
|
26
|
+
updated_at: "2026-05-22T07:00:00Z"
|
|
27
|
+
source_refs:
|
|
28
|
+
- path: archledger/config/
|
|
29
|
+
reason: Config subpackage with model, parse, render
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
The `config` subpackage owns all project configuration concerns. `config/model.py` defines frozen dataclasses for each configuration domain: `SourceConfig`, `BuildConfig` (with nested `BuildOutputConfig`), `Arc42Config`, `SkillConfig`, `TrackingConfig`, and the unified `ProjectConfig` facade that composes them via properties. `config/parse.py` loads and validates `archledger.toml` using `tomllib` (or `tomli` for Python < 3.11), with strict key validation and environment variable expansion. `config/render.py` generates default configuration files for `archledger init`. The subpackage re-exports key types from `__init__.py`.
|
|
33
|
+
|
|
34
|
+
The `[diagrams]` section supports five diagram types (`text`, `ascii`, `unicode`, `svgbob`, `mermaid`) and six renderers (`pass-through`, `mermaid-cli`, `svgbob`, `goat`, `asciidoctor-diagram`, `kroki`). The default diagram type is `text`, ensuring that new diagram records produce readable text-based diagrams in native builds without any external tooling.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
id: al_0054
|
|
4
|
+
type: black_box
|
|
5
|
+
title: Record Type Registry
|
|
6
|
+
status: accepted
|
|
7
|
+
section: building_block_view
|
|
8
|
+
level: 1
|
|
9
|
+
parent: al_0041
|
|
10
|
+
order: 115
|
|
11
|
+
date: "2026-05-21"
|
|
12
|
+
interfaces:
|
|
13
|
+
- RECORD_TYPES registry
|
|
14
|
+
- CLI_KIND_ALIASES
|
|
15
|
+
- RecordTypeSpec dataclass
|
|
16
|
+
location:
|
|
17
|
+
- archledger/record_types.py
|
|
18
|
+
fulfilled_requirements: []
|
|
19
|
+
risks: []
|
|
20
|
+
tags: []
|
|
21
|
+
body_format: markdown
|
|
22
|
+
created_at: "2026-05-21T11:31:25Z"
|
|
23
|
+
updated_at: "2026-05-22T07:00:00Z"
|
|
24
|
+
source_refs:
|
|
25
|
+
- archledger/record_types.py
|
|
26
|
+
- path: archledger/templates/records/diagram.md.j2
|
|
27
|
+
reason: Diagram template scaffolding per diagram type
|
|
28
|
+
- path: archledger/templates/records/diagram.adoc.j2
|
|
29
|
+
reason: Diagram template scaffolding per diagram type
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
The `record_types.py` module is the central registry for all arc42 record types. It defines `RecordTypeSpec`, a frozen dataclass mapping each record kind to its directory name, filename prefix, default section, template basename, CLI aliases, default status/level, and a context factory function. The `RECORD_TYPES` dictionary provides the authoritative lookup. `CLI_KIND_ALIASES` maps alternative names (e.g., `qg` for `quality_goal`) for the CLI.
|
|
33
|
+
|
|
34
|
+
The diagram context factory defaults `diagram_type` to `"text"` (previously `"mermaid"`). Supported diagram types are `text`, `ascii`, `unicode`, `svgbob`, and `mermaid`. The default can be overridden per-project via the `[diagrams].default_type` config key, which the Repository Layer passes through when creating diagram records.
|
|
35
|
+
|
|
36
|
+
This module was extracted from `model.py` to keep the model focused on data structures while record type configuration lives in one discoverable location.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
id: al_0055
|
|
4
|
+
type: black_box
|
|
5
|
+
title: Check Layer
|
|
6
|
+
status: accepted
|
|
7
|
+
section: building_block_view
|
|
8
|
+
level: 1
|
|
9
|
+
parent: al_0041
|
|
10
|
+
order: 125
|
|
11
|
+
date: "2026-05-21"
|
|
12
|
+
interfaces:
|
|
13
|
+
- content_warnings()
|
|
14
|
+
location:
|
|
15
|
+
- archledger/checks.py
|
|
16
|
+
fulfilled_requirements: []
|
|
17
|
+
risks: []
|
|
18
|
+
tags: []
|
|
19
|
+
body_format: markdown
|
|
20
|
+
created_at: "2026-05-21T11:32:00Z"
|
|
21
|
+
updated_at: "2026-05-22T07:00:00Z"
|
|
22
|
+
source_refs:
|
|
23
|
+
- archledger/checks.py
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
The `checks.py` module provides per-record-type content validation beyond structural checks. The main entry point is `content_warnings()`, which returns a list of warning strings for a given `ArchitectureRecord`. It dispatches to type-specific checkers registered in `_CONTENT_WARNING_CHECKERS`: quality goals require scenarios, stakeholders require expectations, constraints require impact and valid categories, ADRs require Context/Decision/Consequences sections and deciders, quality scenarios require measurable response measures, risks require valid severity/probability and mitigation, and so on. It also detects placeholder text in record bodies and cross-dialect syntax contamination (e.g., AsciiDoc headings in Markdown records).
|
|
27
|
+
|
|
28
|
+
For diagram records, the check layer validates the `diagram_type` field against the allowed set (`text`, `ascii`, `unicode`, `svgbob`, `mermaid`), verifies that the body contains the appropriate fenced or literal block for the declared type and source dialect (Markdown uses ` ```textdiagram `/` ```svgbob `/` ```mermaid ` fences; AsciiDoc uses `[source,text]`+`----`, `[svgbob]`+`....`, or `[mermaid]`+`....` blocks), and checks for empty diagram blocks. Text-type diagrams (`text`, `ascii`, `unicode`) receive an additional line-length check (120 characters max) to keep diagrams readable in terminals and Git diffs.
|
|
29
|
+
|
|
30
|
+
This module was extracted from `repository.py` to isolate validation logic.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
id: al_0056
|
|
4
|
+
type: black_box
|
|
5
|
+
title: Source Ref Validation
|
|
6
|
+
status: accepted
|
|
7
|
+
section: building_block_view
|
|
8
|
+
level: 1
|
|
9
|
+
parent: al_0041
|
|
10
|
+
order: 135
|
|
11
|
+
date: "2026-05-21"
|
|
12
|
+
interfaces:
|
|
13
|
+
- normalize_source_refs()
|
|
14
|
+
- validate_relative_posix_path()
|
|
15
|
+
location:
|
|
16
|
+
- archledger/source_refs.py
|
|
17
|
+
fulfilled_requirements: []
|
|
18
|
+
risks: []
|
|
19
|
+
tags: []
|
|
20
|
+
body_format: markdown
|
|
21
|
+
created_at: "2026-05-21T11:32:28Z"
|
|
22
|
+
updated_at: "2026-05-21T11:32:28Z"
|
|
23
|
+
source_refs:
|
|
24
|
+
- archledger/source_refs.py
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
The `source_refs.py` module handles validation and normalization of source traceability links on architecture records. `validate_relative_posix_path()` enforces that source ref paths are relative, use POSIX separators, and do not traverse parent directories. `normalize_source_refs()` processes the raw `source_refs` list from YAML front matter, supporting both shorthand string syntax (`path/to/file.py#SymbolName`) and full mapping syntax with explicit path, symbols, and reason. It verifies that referenced paths and directories actually exist in the workspace. `RelativePosixPathError` provides structured error reporting for invalid paths. This module was extracted from `model.py` to keep source ref validation independent from the core data model.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0071
|
|
3
|
+
type: concept
|
|
4
|
+
title: Record lifecycle and status
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-21"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: cross_cutting_concepts
|
|
10
|
+
order: 10
|
|
11
|
+
applies_to:
|
|
12
|
+
- Repository Layer
|
|
13
|
+
- CLI Layer
|
|
14
|
+
source_refs:
|
|
15
|
+
- README.md
|
|
16
|
+
- archledger/section_rendering.py
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
Every record has a status field that controls its lifecycle: `draft` (incomplete, excluded from default builds), `proposed` (visible but not formally confirmed), `accepted` (confirmed, included by default), `deprecated` (visible but no longer preferred), and `superseded` (hidden unless explicitly included). The `check` command warns about draft records and empty sections. The `build` command only includes records with visible statuses by default; `--include-draft` and `--include-superseded` flags override this.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0072
|
|
3
|
+
type: concept
|
|
4
|
+
title: Config discovery and path resolution
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-21"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: cross_cutting_concepts
|
|
10
|
+
order: 20
|
|
11
|
+
applies_to:
|
|
12
|
+
- Storage Layer
|
|
13
|
+
- CLI Layer
|
|
14
|
+
- Config Layer
|
|
15
|
+
source_refs:
|
|
16
|
+
- README.md
|
|
17
|
+
- archledger/section_rendering.py
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
archledger discovers its project configuration by walking up from the current directory looking for `archledger.toml` or `.archledger.toml`. The `archledger_dir` setting in the config can be relative (resolved from the config file's directory) or absolute (used as-is). This allows the storage directory to live outside the source tree, for example in a separate state repository.
|
|
21
|
+
|
|
22
|
+
Config parsing is handled by the Config Layer (`config/` subpackage): `config/parse.py` loads and validates the TOML file, `config/model.py` defines typed dataclasses for each configuration domain (source, build, arc42, skill, tracking), and `config/render.py` generates default configuration files for `archledger init`. Path resolution happens in `storage/paths.py`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0073
|
|
3
|
+
type: concept
|
|
4
|
+
title: Dialect abstraction for dual-source support
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-22"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: cross_cutting_concepts
|
|
10
|
+
order: 30
|
|
11
|
+
applies_to:
|
|
12
|
+
- Dialect Layer
|
|
13
|
+
- Section Rendering Layer
|
|
14
|
+
- Assembly Layer
|
|
15
|
+
source_refs:
|
|
16
|
+
- README.md
|
|
17
|
+
- archledger/section_rendering.py
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
archledger supports both Markdown and AsciiDoc as first-class source formats. The dialect abstraction (`dialects.py`) defines a `Dialect` base class with methods for headings, tables, bullets, and strong text. `MarkdownDialect` and `AsciiDocDialect` implement these using their respective markup conventions. All rendering code in the Section Rendering Layer and Assembly Layer uses dialects rather than hardcoded markup, ensuring that a single rendering codebase produces correct output for both source formats. Templates exist in both `.md.j2` and `.adoc.j2` variants.
|
|
21
|
+
|
|
22
|
+
For diagram records, the dialect determines the block syntax used in both templates and validation: Markdown diagrams use fenced code blocks (` ```textdiagram `, ` ```svgbob `, ` ```mermaid `), while AsciiDoc diagrams use literal or source blocks (`[source,text]`+`----`, `[svgbob]`+`....`, `[mermaid]`+`....`). Text-based diagram types (`text`, `ascii`, `unicode`) use the same fenced/literal block syntax within each dialect, differing only in the content characters used.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: al_0074
|
|
3
|
+
type: concept
|
|
4
|
+
title: Source tracking and change impact analysis
|
|
5
|
+
schema_version: 2
|
|
6
|
+
date: "2026-05-21"
|
|
7
|
+
body_format: markdown
|
|
8
|
+
status: accepted
|
|
9
|
+
section: cross_cutting_concepts
|
|
10
|
+
order: 40
|
|
11
|
+
applies_to:
|
|
12
|
+
- Source Tracking Layer
|
|
13
|
+
- CLI Layer
|
|
14
|
+
- Repository Layer
|
|
15
|
+
source_refs:
|
|
16
|
+
- README.md
|
|
17
|
+
- archledger/section_rendering.py
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
The source tracking subsystem allows agents to detect which workspace files changed since the last baseline snapshot and which architecture records are impacted. A snapshot (`archledger source snapshot`) records SHA-256 hashes of all tracked files. The `source changed` command computes the diff between the baseline and current state, then cross-references changed files with record `source_refs` to identify impacted records and sections. Files that changed but have no linked records are reported as unlinked. This enables agents to update only the documentation affected by code changes.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
id: al_0075
|
|
4
|
+
type: concept
|
|
5
|
+
title: Multi-type diagram records
|
|
6
|
+
status: accepted
|
|
7
|
+
section: cross_cutting_concepts
|
|
8
|
+
order: 50
|
|
9
|
+
date: "2026-05-22"
|
|
10
|
+
applies_to:
|
|
11
|
+
- Record Type Registry
|
|
12
|
+
- Check Layer
|
|
13
|
+
- Config Layer
|
|
14
|
+
- Assembly Layer
|
|
15
|
+
body_format: markdown
|
|
16
|
+
created_at: "2026-05-22T07:07:32Z"
|
|
17
|
+
updated_at: "2026-05-22T07:07:32Z"
|
|
18
|
+
source_refs:
|
|
19
|
+
- archledger/record_types.py
|
|
20
|
+
- archledger/checks.py
|
|
21
|
+
- archledger/templates/records/diagram.md.j2
|
|
22
|
+
- archledger/templates/records/diagram.adoc.j2
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Diagram records support five types: `text`, `ascii`, `unicode`, `svgbob`, and `mermaid`. The default type is `text`, configured via `[diagrams].default_type` in `archledger.toml` and overridable per-record with `--diagram-type` on the CLI.
|
|
26
|
+
|
|
27
|
+
Text-based types (`text`, `ascii`, `unicode`) store diagram content as plain text in fenced Markdown blocks (` ```textdiagram `) or AsciiDoc literal blocks (`[source,text]` + `----`). They render directly in native builds without external tools, are readable in Git diffs and terminals, and are validated with a 120-character line-length limit.
|
|
28
|
+
|
|
29
|
+
`svgbob` uses the svgbob markup syntax in dedicated fenced/literal blocks. `mermaid` uses Mermaid syntax in dedicated fenced/literal blocks and requires an external renderer (mermaid-cli, asciidoctor-diagram, or Kroki) for image output.
|
|
30
|
+
|
|
31
|
+
The Check Layer validates diagram type against the allowed set, verifies that the body contains the correct block syntax for the declared type and dialect, checks for empty blocks, and enforces line-length limits on text diagrams. Templates produce type-appropriate scaffolding when creating new diagram records.
|