chore: add architecture harness baseline tooling
💡 Change Scope
- [x] Small Change: Fast feedback, localized UI/logic, low-risk.
- [ ] Large Change: New feature, cross-boundary logic, runtime-risk (persistence, IPC, lifecycle, recovery).
📝 What Does This PR Do?
Adds a dedicated project harness area and an architecture harness for executable architecture drift checks.
- Adds
harness/with a root registry and aggregate harness commands. - Adds
harness/architecture/with the analyzer, rules, regression tests, staged doc-sync guard, and split baseline result files. - Adds manual commands:
pnpm harness:check,pnpm harness:list,pnpm arch:audit,pnpm arch:check,pnpm arch:doc-sync,pnpm arch:results, andpnpm arch:test. - Documents the manual baseline phase, progressive repair workflow, architecture-doc sync process, and future CI promotion policy.
- Keeps harness checks separate from product functional tests and Playwright E2E; this PR does not wire the harness into CI,
pnpm pre-commit, or default product test discovery.
🏗️ Large Change Spec (Required if "Large Change" is checked)
Not applicable. This is internal harness/docs/tooling only and is not wired into runtime, persistence, IPC, CI, pnpm pre-commit, or product E2E.
1. Context & Business Logic
Not applicable for Large Change. The behavior introduced here is a manual architecture drift inspection workflow: compare actual source structure/import/API usage against documented architecture rules and record the current baseline for progressive repair.
2. State Ownership & Invariants
No product runtime state is introduced.
Invariants for the harness workflow:
- Harness checks remain separate from product functional tests and E2E.
- Architecture baseline result files are deterministic and split by rule so each file stays reviewable.
- Architecture contract-document changes must either update executable rules/results/tests or be explicitly declared as
no executable-rule impact.
3. Verification Plan & Regression Layer
Verification is locked at the tooling/unit layer:
harness/architecture/tests/architectureRules.spec.tscovers analyzer rule behavior.pnpm harness:checkcovers architecture audit, doc-sync guard, and harness-specific tests.- Staged repository gates cover max lines, naming, secrets, formatting, and whitespace.
✅ Delivery & Compliance Checklist
- [ ] My code passes the ultimate gatekeeper:
pnpm pre-commitis completely green.- Not run because
pnpm pre-commitincludes E2E-related work; user explicitly requested full verification excluding E2E for this PR.
- Not run because
- [x] I have signed the CLA if required (see
CLA.md). - [x] I have included new tests to lock down the behavior (or explicitly stated why it's untestable).
- [x] I have strictly adhered to the
DEVELOPMENT.mdarchitectural boundaries. - [x] I have attached a screenshot or screen recording (if this touches the UI).
- Not applicable; this PR does not touch UI.
- [x] I have updated the documentation accordingly (if adding a feature or changing a contract).
Verification run, excluding E2E by request:
pnpm line-check:stagedpnpm secret-check:stagedpnpm naming-check:stagedpnpm lint:fixpnpm format-check:stagedpnpm checkpnpm test -- --runpnpm harness:checkgit diff --cached --check
E2E and pnpm pre-commit were intentionally not run for this PR per user request.
📸 Screenshots / Visual Evidence
Not applicable; no UI change.