# eliware/test architecture

> Architecture diagram of the GitHub repository eliware/test, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eliware/test
- Repository: https://github.com/eliware/test

## Overview

@eliware/test is a Node.js CLI and reusable validation framework for Eliware repositories. A user invokes the CLI with a validation mode or focused test path; the CLI parses the request, acquires a repository lock, and delegates to validation orchestration. Orchestration prepares a repository context and plan, discovers and selects checks, executes them, and returns results for CLI output. Checks span repository conventions and documentation, profiles, tests and coverage, and packaging. The README documents these capabilities; sampled sources confirm key orchestration and inventory links, but not every check’s runtime wiring.

Main entry points: [`src/orchestrators/execute-validation-plan.mjs`](https://github.com/eliware/test/blob/main/src/orchestrators/execute-validation-plan.mjs) (Plan execution), [`src/orchestrators/run-validation.mjs`](https://github.com/eliware/test/blob/main/src/orchestrators/run-validation.mjs) (Validation runner), [`src/cli/run-cli.mjs`](https://github.com/eliware/test/blob/main/src/cli/run-cli.mjs) (CLI runner), [`bin/eliware-test.mjs`](https://github.com/eliware/test/blob/main/bin/eliware-test.mjs) (CLI entrypoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_entrypoint["CLI entrypoint<br/>[eliware-test.mjs]"]
  node_argparse["Argument handling"]
  node_cli_runner["CLI runner<br/>[run-cli.mjs]"]
end

subgraph group_orchestration["Validation orchestration"]
  node_validation["Validation runner<br/>[run-validation.mjs]"]
  node_planning["Plan preparation"]
  node_check_discovery["Check discovery"]
  node_plan_execution["Plan execution"]
end

subgraph group_inventory["Repository inventory"]
  node_repo_context["Validation context"]
  node_repo_inventory["Repository inventory"]
  node_repo_discovery["File discovery"]
end

subgraph group_checks["Validation checks"]
  node_conventions["Repository conventions"]
  node_documentation["Documentation validation<br/>[E-0.1.1]"]
  node_profile_checks["Profile checks"]
  node_test_checks["Tests and coverage<br/>[E-0.1.20]"]
  node_coverage_evidence["Coverage evidence"]
  node_tool_modes["Tool modes<br/>[E-0.1.20]"]
end

subgraph group_results["Results and diagnostics"]
  node_finalize["Run finalization"]
  node_write_results["CLI output"]
end

node_user(("Repository maintainer"))

node_user -->|"invokes"| node_entrypoint
node_entrypoint -->|"starts"| node_cli_runner
node_cli_runner -->|"parses options"| node_argparse
node_cli_runner -->|"runs validation"| node_validation
node_validation -->|"prepares plan"| node_planning
node_validation -->|"discovers checks"| node_check_discovery
node_validation -->|"executes plan"| node_plan_execution
node_validation -->|"finalizes run"| node_finalize
node_planning -->|"creates context"| node_repo_context
node_repo_context -->|"creates inventory"| node_repo_inventory
node_repo_inventory -->|"discovers entries"| node_repo_discovery
node_plan_execution -.->|"runs checks"| node_conventions
node_plan_execution -.->|"runs checks"| node_documentation
node_plan_execution -.->|"runs checks"| node_profile_checks
node_plan_execution -.->|"runs checks"| node_test_checks
node_test_checks -->|"assesses coverage"| node_coverage_evidence
node_plan_execution -.->|"runs selected mode"| node_tool_modes
node_finalize -.->|"returns results"| node_write_results
node_cli_runner -->|"writes output"| node_write_results

click node_entrypoint "https://github.com/eliware/test/blob/main/bin/eliware-test.mjs"
click node_argparse "https://github.com/eliware/test/blob/main/src/cli/read-diagnostic-options.mjs"
click node_cli_runner "https://github.com/eliware/test/blob/main/src/cli/run-cli.mjs"
click node_validation "https://github.com/eliware/test/blob/main/src/orchestrators/run-validation.mjs"
click node_planning "https://github.com/eliware/test/blob/main/src/orchestrators/prepare-validation-plan.mjs"
click node_check_discovery "https://github.com/eliware/test/blob/main/src/orchestrators/discover-checks.mjs"
click node_plan_execution "https://github.com/eliware/test/blob/main/src/orchestrators/execute-validation-plan.mjs"
click node_repo_context "https://github.com/eliware/test/blob/main/src/orchestrators/create-validation-context.mjs"
click node_repo_inventory "https://github.com/eliware/test/blob/main/src/checks/create-repository-inventory.mjs"
click node_repo_discovery "https://github.com/eliware/test/blob/main/src/checks/general/E-0.1/find-repository-files.mjs"
click node_conventions "https://github.com/eliware/test/tree/main/src/checks/general"
click node_documentation "https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.1"
click node_profile_checks "https://github.com/eliware/test/tree/main/src/checks/application"
click node_test_checks "https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.20"
click node_coverage_evidence "https://github.com/eliware/test/blob/main/src/checks/general/E-0.1/E-0.1.20/E-0.1.20.10/validate-coverage-file-evidence.mjs"
click node_tool_modes "https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.20"
click node_finalize "https://github.com/eliware/test/blob/main/src/orchestrators/finalize-validation-run.mjs"
click node_write_results "https://github.com/eliware/test/blob/main/src/cli/write-validation-results.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entrypoint,node_argparse,node_cli_runner toneBlue
class node_validation,node_planning,node_check_discovery,node_plan_execution toneAmber
class node_repo_context,node_repo_inventory,node_repo_discovery toneMint
class node_conventions,node_documentation,node_profile_checks,node_test_checks,node_coverage_evidence,node_tool_modes toneRose
class node_finalize,node_write_results,node_user toneIndigo
```

## Components

### CLI

- [CLI entrypoint](https://github.com/eliware/test/blob/main/bin/eliware-test.mjs): `bin/eliware-test.mjs`
- [Argument handling](https://github.com/eliware/test/blob/main/src/cli/read-diagnostic-options.mjs): `src/cli/read-diagnostic-options.mjs`
- [CLI runner](https://github.com/eliware/test/blob/main/src/cli/run-cli.mjs): `src/cli/run-cli.mjs`

### Validation orchestration

- [Validation runner](https://github.com/eliware/test/blob/main/src/orchestrators/run-validation.mjs): `src/orchestrators/run-validation.mjs`
- [Plan preparation](https://github.com/eliware/test/blob/main/src/orchestrators/prepare-validation-plan.mjs): `src/orchestrators/prepare-validation-plan.mjs`
- [Check discovery](https://github.com/eliware/test/blob/main/src/orchestrators/discover-checks.mjs): `src/orchestrators/discover-checks.mjs`
- [Plan execution](https://github.com/eliware/test/blob/main/src/orchestrators/execute-validation-plan.mjs): `src/orchestrators/execute-validation-plan.mjs`

### Repository inventory

- [Validation context](https://github.com/eliware/test/blob/main/src/orchestrators/create-validation-context.mjs): `src/orchestrators/create-validation-context.mjs`
- [Repository inventory](https://github.com/eliware/test/blob/main/src/checks/create-repository-inventory.mjs): `src/checks/create-repository-inventory.mjs`
- [File discovery](https://github.com/eliware/test/blob/main/src/checks/general/E-0.1/find-repository-files.mjs): `src/checks/general/E-0.1/find-repository-files.mjs`

### Validation checks

- [Repository conventions](https://github.com/eliware/test/tree/main/src/checks/general): `src/checks/general`
- [Documentation validation](https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.1): `src/checks/general/E-0.1/E-0.1.1`
- [Profile checks](https://github.com/eliware/test/tree/main/src/checks/application): `src/checks/application`
- [Tests and coverage](https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.20): `src/checks/general/E-0.1/E-0.1.20`
- [Coverage evidence](https://github.com/eliware/test/blob/main/src/checks/general/E-0.1/E-0.1.20/E-0.1.20.10/validate-coverage-file-evidence.mjs): `src/checks/general/E-0.1/E-0.1.20/E-0.1.20.10/validate-coverage-file-evidence.mjs`
- [Tool modes](https://github.com/eliware/test/tree/main/src/checks/general/E-0.1/E-0.1.20): `src/checks/general/E-0.1/E-0.1.20`

### Results and diagnostics

- [Run finalization](https://github.com/eliware/test/blob/main/src/orchestrators/finalize-validation-run.mjs): `src/orchestrators/finalize-validation-run.mjs`
- [CLI output](https://github.com/eliware/test/blob/main/src/cli/write-validation-results.mjs): `src/cli/write-validation-results.mjs`

### Other components

- **Repository maintainer**

## Connections

- Repository maintainer → CLI entrypoint: invokes (evidence: `README.md`)
- CLI entrypoint → CLI runner: starts (evidence: `bin/eliware-test.mjs`)
- CLI runner → Argument handling: parses options (evidence: `src/cli/run-cli.mjs`)
- CLI runner → Validation runner: runs validation (evidence: `src/cli/run-cli.mjs`)
- Validation runner → Plan preparation: prepares plan (evidence: `src/orchestrators/run-validation.mjs`)
- Validation runner → Check discovery: discovers checks (evidence: `src/orchestrators/run-validation.mjs`)
- Validation runner → Plan execution: executes plan (evidence: `src/orchestrators/run-validation.mjs`)
- Validation runner → Run finalization: finalizes run (evidence: `src/orchestrators/run-validation.mjs`)
- Plan preparation → Validation context: creates context (evidence: `src/orchestrators/prepare-validation-plan.mjs`)
- Validation context → Repository inventory: creates inventory (evidence: `src/orchestrators/create-validation-context.mjs`)
- Repository inventory → File discovery: discovers entries (evidence: `src/checks/create-repository-inventory.mjs`)
- Plan execution → Repository conventions: runs checks
- Plan execution → Documentation validation: runs checks
- Plan execution → Profile checks: runs checks
- Plan execution → Tests and coverage: runs checks
- Tests and coverage → Coverage evidence: assesses coverage (evidence: `src/checks/general/E-0.1/E-0.1.20/run-coverage-check.mjs`)
- Plan execution → Tool modes: runs selected mode
- Run finalization → CLI output: returns results
- CLI runner → CLI output: writes output (evidence: `src/cli/run-cli.mjs`)
