This commit is contained in:
2026-06-05 15:01:34 +03:00
parent 50180aaa14
commit 4cef6af041
27 changed files with 13547 additions and 892 deletions

View File

@@ -109,13 +109,41 @@ Only include the commands that are truly required by the feature scope.
### Contract and ADR Propagation
If a task implements or depends on a guarded contract, append a concise guardrail summary derived from `@RATIONALE` and `@REJECTED`.
If a task implements a function with a pre-generated contract in `contracts/modules.md`, inline the contract's key execution constraints directly into the task description. This eliminates cross-file navigation — the implementing agent sees the contract in the task.
Examples:
- `- [ ] T021 [US1] Implement dashboard migration service in backend/src/core/migration/service.py (RATIONALE: full scan ensures consistency; REJECTED: incremental-only update leaves stale entries)`
- `- [ ] T033 [US2] Add WebSocket event handler in frontend/src/lib/stores/taskDrawer.js (RATIONALE: real-time feedback prevents polling; REJECTED: interval polling for task status)`
**Function contract inlining format (C3+):**
If no safe executable task wording exists because the accepted path is still unclear, stop and emit `[NEED_CONTEXT: target]`.
```text
- [ ] T017 [US1] Implement Core.Auth.Login in backend/src/services/auth_service.py
@PRE: credentials valid, DB connected
@POST: AuthResponse(access_token, refresh_token, user_id)
@DATA_CONTRACT: LoginRequest → AuthResponse
@TEST_EDGE: invalid_credentials→401, locked_account→423, missing_fields→422
- [ ] T018 [US1] Implement UserListModel.search in frontend/src/lib/models/UserListModel.svelte.ts
@ACTION search(query): full-text, resets pagination
@POST: page=1, screenState="loading"
@SIDE_EFFECT: GET /api/users?q={query}
@TEST_EDGE: empty_query→screenState="idle", network_fail→screenState="error"
```
**Rules:**
- Only inline for C3+ functions with pre-generated contracts in `contracts/modules.md`.
- C1/C2 functions do NOT get inlined constraints — their task is just the file path.
- Inline ALL `@PRE`, `@POST`, `@SIDE_EFFECT`, `@DATA_CONTRACT`, `@TEST_EDGE` from the contract.
- Keep each constraint on one comma-separated line for CSA 4× density.
- `@TEST_EDGE` format: `scenario→outcome` (compact, survives pooling).
- Task still uses the standard checkbox format on the first line.
**ADR guardrail format (decision memory only):**
If a task depends on a guarded decision but has no function contract, append only `@RATIONALE`/`@REJECTED`:
```text
- [ ] T021 [US1] Implement dashboard migration in backend/src/core/migration/service.py
RATIONALE: full scan ensures consistency
REJECTED: incremental-only update leaves stale entries
```
### Component Reuse Mandate