docs: add docs-as-code process and one ADR per feature
docs/docs-as-code.md defines the workflow; docs/adr holds 31 ADRs (retroactive, reconstructed from code and changelog) with a template and index. docs/check-docs.sh validates ADR structure, index, cited code paths, relative links and CLAUDE.md/AGENTS.md sync.
This commit is contained in:
1 parent
ce8d777c63
commit
b292590cdc
36 files changed
+987
No files matched your search
@@ -0,0 +1,24 @@
|
||||
# 0003. Layered architecture: Core knows nothing about the UI
|
||||
|
||||
- **Status:** Accepted
|
||||
- **Area:** Architecture
|
||||
- **Recorded:** 2026-11-03 (retroactive: reconstructed from code, comments and changelog)
|
||||
|
||||
## Context
|
||||
|
||||
The same wallet logic must be driven by a GUI, a CLI and headless tests. If cryptography or network code leaked into view code it could not be tested without a display and could not be audited in isolation.
|
||||
|
||||
## Decision
|
||||
|
||||
Layers depend only downward: GUI → wallet domain → SPV/sync → network → cryptography → persistence. `src/Core` (`Chain/ Crypto/ Wallet/ Spv/ Net/ Storage/`) has no UI dependency. `src/App` and `src/Cli` depend only on `Core`; the UI reaches the network and cryptography exclusively through the wallet domain.
|
||||
|
||||
## Consequences
|
||||
|
||||
- `dotnet test` covers almost all behaviour headlessly.
|
||||
- The CLI is a second front end for free (0024).
|
||||
- Violations (e.g. a ViewModel opening a socket) are review blockers, not style issues.
|
||||
|
||||
## References
|
||||
|
||||
- `src/Core`
|
||||
- `src/Cli/Program.cs`
|
||||
Reference in new issue
Block a user