docs(validation): update agent configs, skills, ADRs, specs

- qa-tester: add validation v2 testing checklist
- speckit.plan: add component reuse scan for frontend
- molecular-cot-logging: add Svelte logger + CLI reader
- semantics-svelte: add RSM model-first protocol, frontend stack
- templates: update plan/tasks/ux-reference templates
- ADR-0004: add llm_dashboard_validation plugin registration
- ADR-0008: add assistant tool registry for v2 validation
- Specs: update 017 tasks from 51 to 99
This commit is contained in:
2026-05-31 22:32:32 +03:00
parent 328496fde0
commit 6f07c78bdd
10 changed files with 241 additions and 223 deletions

View File

@@ -17,12 +17,13 @@
the iteration process.
-->
**Language/Version**: Python 3.13+ (backend), JavaScript/TypeScript (frontend Svelte 5)
**Primary Dependencies**: FastAPI, SQLAlchemy, APScheduler (backend); SvelteKit, Vite, Tailwind CSS (frontend)
**Language/Version**: Python 3.13+ (backend), TypeScript (frontend Svelte 5 runes-only)
**Primary Dependencies**: FastAPI, SQLAlchemy, APScheduler (backend); SvelteKit 5, Vite, Tailwind CSS (frontend)
**Storage**: PostgreSQL 16
**Testing**: pytest (backend), vitest + @testing-library/svelte (frontend)
**Testing**: pytest (backend), vitest (L1 model tests without render + L2 UX tests with @testing-library/svelte)
**Target Platform**: Linux server (Docker), modern browsers
**Project Type**: web application (FastAPI REST + WebSocket backend, SvelteKit SPA frontend)
**Frontend Architecture**: TypeScript-first, model-first (Screen Models via `.svelte.ts`), runes-only (`$state`, `$derived`, `$effect`), typed callback props (no `createEventDispatcher`)
**Performance Goals**: [domain-specific, e.g., <200ms p95 API latency, 60fps UI]
**Constraints**: [domain-specific, e.g., <100MB memory per container, RBAC enforcement, offline-capable Docker bundle]
**Scale/Scope**: [domain-specific, e.g., 50 concurrent users, 1000 dashboards, 10 plugins]
@@ -31,7 +32,7 @@
*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
[Evaluate against constitution.md and semantics.md. Explicitly confirm semantic protocol compliance, complexity-driven contract coverage, UX-state compatibility (Svelte 5 runes), async boundaries (FastAPI), API-wrapper rules, RBAC/security constraints (local auth + ADFS SSO), plugin lifecycle rules, and any required belief-state/logging constraints for Complexity 4/5 Python modules.]
[Evaluate against constitution.md and semantics.md. Explicitly confirm semantic protocol compliance, complexity-driven contract coverage, TypeScript-first frontend with typed Screen Models (`.svelte.ts`), UX-state compatibility (Svelte 5 runes-only), async boundaries (FastAPI), API-wrapper rules, RBAC/security constraints (local auth + ADFS SSO), plugin lifecycle rules, and any required belief-state/logging constraints for Complexity 4/5 Python modules.]
## Project Structure
@@ -64,10 +65,12 @@ frontend/
├── src/
│ ├── routes/ # SvelteKit pages
│ ├── lib/
│ │ ├── components/ # Reusable Svelte 5 components
│ │ ├── stores/ # Svelte rune stores ($state, $derived)
│ │ ── api/ # API client modules
│ └── i18n/ # Internationalization
│ │ ├── components/ # Reusable Svelte 5 components (thin rendering layer)
│ │ ├── models/ # Screen Models (.svelte.ts — typed, Svelte-reactive state machines)
│ │ ── stores/ # Svelte stores (cross-route state: auth, notifications)
│ └── api/ # API client modules (fetchApi/requestApi wrappers)
│ ├── types/ # TypeScript DTOs — MUST match backend Pydantic schemas
│ └── services/ # Service layer (gitService, taskService)
└── tests/ # vitest tests
docker/ # Docker configurations
@@ -79,18 +82,23 @@ docker/ # Docker configurations
> Use this section to drive Phase 1 artifacts, especially `contracts/modules.md`.
- Classify each planned module/component with `@COMPLEXITY: 1..5`.
- Use comment-anchor syntax appropriate for each context:
- Python: `# [DEF:id:Type]`
- Svelte markup: `<!-- [DEF:id:Type] -->`
- Svelte script: `// [DEF:id:Type]`
- Classify each planned module/component/model with `[C:N]` complexity in the `#region` anchor.
- Use canonical anchor syntax appropriate for each context:
- Python: `# #region ContractId [C:N] [TYPE TypeName] [SEMANTICS tags]` / `# #endregion ContractId`
- Svelte markup: `<!-- #region ContractId [C:N] [TYPE Component] [SEMANTICS tags] -->` / `<!-- #endregion ContractId -->`
- Svelte/TypeScript model: `// #region ModelName [C:N] [TYPE Model] [SEMANTICS tags]` / `// #endregion ModelName`
- Markdown/ADR: `## @{ ContractId [C:N] [TYPE TypeName]` / `## @} ContractId`
- **Legacy `[DEF:id:Type]` syntax is deprecated** use `#region` format exclusively.
- **Model files use `.svelte.ts` extension** canonical format for contracts with Svelte reactive primitives (`$state`, `$derived`, `$effect`).
- Match contract density to complexity:
- Complexity 1: anchors only (DTOs, simple constants)
- Complexity 2: `@PURPOSE` (utility functions, pure helpers)
- Complexity 3: `@PURPOSE`, `@RELATION`; Svelte components also `@UX_STATE`
- Complexity 4: `@PURPOSE`, `@RELATION`, `@PRE`, `@POST`, `@SIDE_EFFECT`; Python also `belief_scope`/`reason`/`reflect` markers; Svelte also `@UX_FEEDBACK`, `@UX_RECOVERY`, `@UX_REACTIVITY`
- Complexity 5: level 4 + `@DATA_CONTRACT`, `@INVARIANT` + `@RATIONALE`/`@REJECTED` decision memory
- C1: anchors only (DTOs, simple constants)
- C2: typically adds `@BRIEF` (utility functions, pure helpers)
- C3: typically adds `@RELATION`; Svelte also `@UX_STATE`; TypeScript also `@STATE`/`@ACTION`
- C4: typically adds `@PRE`, `@POST`, `@SIDE_EFFECT`; Python also `belief_scope`/`reason`/`reflect` markers; Svelte also `@UX_FEEDBACK`, `@UX_RECOVERY`, `@UX_REACTIVITY`
- C5: C4 + `@DATA_CONTRACT`, `@INVARIANT` + `@RATIONALE`/`@REJECTED` decision memory
- **Screen Models** (`[TYPE Model]`) are C4/C5 contracts that declare screen-level state, invariants, and actions. A component that reads/writes model state declares `@RELATION BINDS_TO -> [ModelId]`. See `semantics-svelte` §IIIa.
- Write relations only in canonical form: `@RELATION PREDICATE -> TARGET_ID`
- Allowed predicates: `DEPENDS_ON`, `CALLS`, `INHERITS`, `IMPLEMENTS`, `DISPATCHES`, `BINDS_TO`, `CALLED_BY`, `VERIFIES`.
- If any relation target, DTO, or contract dependency is unknown, emit `[NEED_CONTEXT: target]` instead of inventing placeholders.
## Complexity Tracking