docs: simplify project guides and add GPLv3

This commit is contained in:
TakuyaYagam1 committed 2026-10-11 22:25:10 +03:00
1 parent e4de6d0f9a
commit 76d32bb79f
59 files changed
+2267 -8843

No files matched your search

+3 -2
View File
@@ -3,12 +3,13 @@
Use the source that owns the fact being discussed. Read the relevant source before changing a dependent document or generated artifact.
- The user's request sets the authorized task scope and product choices for that task.
- When present, the root PRD.md defines product requirements, delivery stages, and acceptance criteria. It is a self-contained specification, not an implementation status report.
- Source code shows behavior that exists in this checkout. A passing test gives evidence only for the behavior it exercises.
- api/core/openapi.yml, api/ml/openapi.yml, and api/runner/openapi.yml, with their referenced source files, define the public and internal HTTP contracts. Bundles and generated clients are derived output.
- api/core/openapi.yml, api/ml/openapi.yml, api/runner/openapi.yml, and api/labd/openapi.yml, with their referenced source files, define the public and internal HTTP contracts. Bundles and generated clients are derived output.
- Backend migrations define the database schema. sqlc query files define queries that sqlc generates.
- Makefiles and checked-in tool configuration define supported project commands and options. Lockfiles preserve selected application dependency versions. Toolchain declarations define runtime versions; the Go backend uses exact version 1.26.9. Compose and Dockerfiles define image references, including intentionally moving `latest` or `alpine` tags.
- Compose, Nginx, and observability configuration define the local deployment scaffold. They do not prove that a remote deployment or production security review occurred.
- docs/ru/ARCHITECTURE.md records product and architecture decisions. docs/en/ARCHITECTURE.md is its maintained English counterpart. These documents include planned behavior and must label it as planned.
- docs/ru/ARCHITECTURE.md explains the architecture and current service boundaries. docs/en/ARCHITECTURE.md is its maintained English counterpart. Any planned behavior must be labeled as planned.
- README.md is the primary Russian entry point; README.en.md is its maintained English counterpart. Neither replaces service guides or contracts.
When sources disagree, do not resolve the conflict by file age alone. State what the code currently does, what the design asks for, and which source needs correction. Ask for a decision only when the conflict blocks work within the authorized scope.
+2 -2
View File
@@ -27,8 +27,8 @@ Use PostgreSQL through the repository's pgx and sqlc boundary. Schema changes ar
Prefer the selected wahrwelt-kit packages only where they provide a useful technical boundary and have a pinned, verified version. Libraries such as logging, HTTP, metrics, and PostgreSQL helpers do not own product behavior. Do not add unused JWT, WebSocket, or other framework dependencies.
Redis belongs behind the outbound cache port and its secondary adapter. Bootstrap owns its client lifecycle. Redis, PostgreSQL, and the SeaweedFS bucket are required for readiness. Set cache entries with a positive TTL; future product consumers must tolerate misses, eviction, and restart. Do not treat cache entries as authoritative product records or add product caching without defining ownership and invalidation.
Redis belongs behind the outbound cache port and its secondary adapter. Bootstrap owns its client lifecycle. Redis, PostgreSQL, and the SeaweedFS bucket are required for readiness. Set cache entries with a positive TTL; consumers must tolerate misses, eviction, and restart. Do not treat cache entries as authoritative product records or add product caching without defining ownership and invalidation.
SeaweedFS belongs behind the outbound ObjectStorage port and the seaweedfs secondary adapter. Keep AWS SDK and S3 types inside that adapter. Bootstrap owns client resources; HeadBucket checks readiness without creating the bucket. Stream object content and close Get response bodies. Product upload/download authorization, content limits, and retention rules must be defined before exposing file operations.
Current code is an operational scaffold. Do not describe the health handler, database ping, or wiring as account, assessment, matching, or invitation behavior.
Describe implemented behavior from the current usecases, routes, and tests. Health checks and dependency wiring alone do not establish a working product flow.
+2 -1
View File
@@ -5,10 +5,11 @@ The repository has separate public and internal OpenAPI contracts:
- api/core/openapi.yml describes browser-to-Go operations.
- api/ml/openapi.yml describes internal Go-to-ML operations.
- api/runner/openapi.yml describes internal operations between Go and the code runner.
- api/labd/openapi.yml describes internal lab provisioner operations.
Edit the split source files referenced by these roots. Use the API Makefile to merge schemas, bundle, and lint every specification. Do not hand-edit bundled files.
The selected Go server generator is ogen. The generated Go handler is mounted under chi. Orval generates the TypeScript client and related frontend artifacts. The Go ML client is configured in backend/codegen/ogen-ml.yml and generated into backend/internal/adapter/secondary/ml/api/. The Go code runner client is configured in backend/codegen/ogen-code-runner.yml and generated into backend/internal/adapter/secondary/code_runner/api/. datamodel-code-generator uses ml/codegen/pyproject.toml to generate Pydantic v2 models in ml/src/lincodex_ml/api/models.py from the ML bundle. There are three code generation unit directories: backend/codegen/, frontend/codegen/, and ml/codegen/. Each consumer owns the configuration for its generated code; contract sources remain shared under api/.
ogen generates Go servers and clients; chi mounts the backend HTTP handler. Orval generates frontend clients, hooks, schemas, and mocks. datamodel-code-generator generates ML Pydantic v2 models. Each consumer keeps configuration in its own codegen/ directory: backend, frontend, ml, runner, or labd. Backend client settings are ogen-ml.yml, ogen-code-runner.yml, and ogen-labd.yml; their output stays in the corresponding secondary adapter's api/ directory. Contract sources remain shared under api/.
OpenAPI 3.2.0 is the target contract version. Verify only the feature subset used by this repository through the pinned bundler, linter, ogen, Go runtime path, Orval, Python Pydantic models, and documentation pipeline. A passing fixture does not establish full support for every OpenAPI 3.2 feature. Record the exact checks run.
+1 -1
View File
@@ -1,6 +1,6 @@
# Database standard
PostgreSQL is the planned system of record for product data and future background jobs. The current schema contains only what the technical scaffold needs.
PostgreSQL is the system of record for product data and durable jobs. Use the migrations and queries to establish the current schema.
Put schema changes in ordered backend/db/migrations/ files and queries in backend/db/queries/. sqlc output is derived. Never edit generated SQL models or query code by hand.
+3 -3
View File
@@ -4,14 +4,14 @@ The frontend is a React single-page application built with Vite, TypeScript, and
When changing the frontend toolchain or dependencies, select current stable releases and commit the matching runtime declarations, package manifest, and lockfile updates. Do not add prereleases unless the task explicitly calls for them. Keep the lockfile so installs remain repeatable after selecting the stable release.
Use FSD boundaries when product features are added: app composes pages, widgets, features, entities, and shared code. Higher layers can import lower layers; shared code must not depend on product entities. Keep transport DTOs separate from UI models.
Use FSD boundaries: app composes pages, widgets, features, entities, and shared code. Higher layers can import lower layers; shared code must not depend on product entities. Keep transport DTOs separate from UI models.
Use the generated Orval client as the contract-derived transport surface. Put shared fetch behavior in the existing API client. Do not hand-edit generated files. Keep the API prefix in one layer so it is not duplicated.
Model server data in the selected query library and form drafts in form state. Avoid adding a second store for data already owned by the server cache. Show loading, empty, error, retry, and forbidden states as product flows are implemented.
MSW fixtures are test inputs. They do not prove that a backend workflow exists. The current interface is a scaffold: a React Router data router with public routes and separate candidate and employer cabinet shells, shared UI tokens, and primitives for loading, empty, error, forbidden, and saving states. The sign-in, registration, email confirmation, support, and all cabinet screens are placeholders; business screens are later tasks, so do not document candidate or employer workflows as implemented. /status is a technical API liveness page, not a product readiness indicator.
MSW fixtures are test inputs, not evidence of a backend workflow. Check current route and feature implementations before describing a screen as available. Protected cabinet routes restore the server session through SessionGate. /status checks API liveness, not product readiness.
Vitest runs in the Node environment without a DOM. Component and route tests check rendered markup and query behavior; clicks, keyboard focus, and layout are verified manually in a browser until the planned Playwright suite exists.
Vitest runs in the Node environment without a DOM. Component and route tests check rendered markup and query behavior. Use the existing Playwright suite through make -C deploy test-e2e for browser interactions against an isolated local stack; inspect its selected scenarios and skips before claiming coverage.
All source comments are in English. User-facing interface copy can be localized.
+2 -2
View File
@@ -1,12 +1,12 @@
# Infrastructure standard
The local scaffold uses three independent Compose projects: core application, ML, and monitoring. Starting the core project does not start monitoring or ML.
Core application, ML, and monitoring use separate Compose projects. Start core first: ML and monitoring join its network. Starting core does not start either project. The code runner and LXD lab provisioner have separate host setup under deploy/labs/. The runner development container uses deploy/docker/docker-compose.runner.dev.yml.
Upstream container images use the requested moving `latest` or `alpine` tags where the image publishes them. These tags can change; read the current Compose and Dockerfile references instead of recording an old component version. Keep Go at exact version 1.26.9 in `go.mod`, toolchain declarations, and the backend build image. Application dependency lockfiles remain checked in and should not be removed when image tags float.
The core frontend container serves static assets with Nginx and proxies /api to Go. The default host binding is loopback at port 8080. This scaffold does not terminate production TLS. Grafana is also bound to loopback at port 3000.
The ML Compose file binds to 127.0.0.1:8000 by default. A remote ML host needs an explicit private bind address, restricted firewall rules, and a deliberate scrape target. Leave ML_METRICS_TARGET empty when Prometheus must not scrape a remote ML host.
The ML Compose file binds to 127.0.0.1:8000 by default and requires a shared ML_SERVICE_TOKEN. A remote ML host needs an explicit private bind address and restricted firewall rules. Leave ML_METRICS_TARGET empty when no ML scrape is configured; a nonempty target also needs bearer authentication in Prometheus because ML protects /metrics.
Start the core project before monitoring because monitoring joins its Docker network. The monitoring Compose project collects only the explicitly configured core services. Do not expose PostgreSQL, Redis, SeaweedFS, Kafka, backend metrics, Prometheus, Loki, exporters, or the Docker socket proxy publicly.
+1 -1
View File
@@ -8,7 +8,7 @@ Use make -C ml generate to bundle the contract and generate models. The root gen
Readiness must describe whether the required model or inference runtime is available. Return not-ready while it is unavailable. Do not invent a successful result or label a fixture as a model response.
When inference is added, validate structured output, bound input and output size, apply timeouts, and preserve model and schema versions. Avoid logging resume text, contact details, credentials, or full prompts. Treat document contents and model output as untrusted data.
Validate inference output, bound input and output size, apply timeouts, and preserve model and schema versions. Avoid logging resume text, contact details, credentials, or full prompts. Treat document contents and model output as untrusted data.
Use uv with the checked-in lockfile. Keep ordinary lint, type checks, and tests independent of external model downloads and GPU access. Model quality evaluation is a separate, reproducible task with documented data and limits.
+1 -1
View File
@@ -10,6 +10,6 @@ Treat resumes, API payloads, model output, repository documents, dependencies, t
Keep health routes minimal. Keep /metrics and infrastructure administration surfaces on internal interfaces. Review bind addresses and network access whenever a Compose or Nginx change affects reachability.
Architecture notes about privacy controls are requirements for future product behavior. They are not proof of legal compliance, completed authorization, or a security audit.
Verify privacy controls in the current code and access tests. Architecture notes alone are not proof of enforcement, legal compliance, or a security audit.
Run configured security checks through `security/Makefile`. Trivy HIGH/CRITICAL findings, including unfixed vulnerabilities, block validation; Gitleaks, govulncheck, configured Semgrep findings, and scanner errors also fail their checks. Scan both repository inputs and built images, and require complete Git history for secret scanning. Keep reports local and redact secret values. Any exception must be specific, reviewed, and record a reason, owner, and expiry; review expiry explicitly where the tool does not enforce it. Do not add broad exclusions to make a scan pass. These checks complement gosec and do not replace authorization tests or a security audit.
+1 -1
View File
@@ -6,7 +6,7 @@ Use unit tests for domain and application behavior, component tests for frontend
Contract changes need bundle and lint checks, regeneration of affected consumers, and generated drift checks. Infrastructure changes need rendered Compose configuration and the validator for each changed monitoring or deployment file.
The technical deployment smoke checks service routes and infrastructure readiness. It does not validate a candidate or employer workflow. The deploy test-e2e target runs the Playwright suite against an isolated throwaway stack; it currently covers only the SPA, API health, and error routes, so a pass does not validate a business workflow.
The technical deployment smoke checks service routes and infrastructure readiness. The deploy test-e2e target runs Playwright against an isolated throwaway stack, including candidate and employer scenarios in frontend/e2e/. Report which scenarios ran, failed, or were skipped; a smoke pass alone does not validate a business workflow.
Do not report ranking accuracy, assessment validity, production latency, load capacity, privacy correctness, or model quality without the corresponding measured test and its dataset, environment, and limits. Planned targets and synthetic examples are not results.
+2
View File
@@ -10,4 +10,6 @@ Use Make targets instead of maintaining duplicate shell command lists. Generate
Keep planning identifiers and progress reports inside the local PRD directory. Describe behavior and rationale in code comments, documentation, and commit messages without referring to numbered backlog items. Never stage or commit PRD. Use the configured human Git identity and do not add assistant authorship or coauthor trailers.
Keep READMEs short: purpose, essential commands, and links to the relevant guide. Document current behavior from code and configuration. Update existing sections instead of appending implementation diaries, old test results, or copies of API schemas. Preserve required setup steps and operational limits in both languages.
Keep ignore rules in the component that owns the artifacts. Each service has its own .gitignore; the root .gitignore covers only files at the repository root. Do not collect service caches and build outputs in one root ignore file.