# Feature Task Template

## Goal

Describe the smallest user-visible or system behavior this chunk should deliver.

## Requirements Source

- Link or paste the approved requirements, or state that this is a maintenance chunk with no separate requirements artifact.
- List any assumptions that were approved before implementation.

## Scope

- Files, modules, or layers that may be changed.
- Required behavior changes.
- Required generated artifacts.
- Required tests.

## Research/Design Checkpoint

Required when `Mechanisms:` or QA required evidence indicates a research-gated
mechanism. Include existing architecture, common pattern/resource, chosen model,
why not simpler, test oracle, failure modes, and non-goals.

## Out Of Scope

- Features, refactors, dependencies, schema changes, UI changes, or archived experiments that must not be touched.

## Acceptance Criteria

- Observable result 1.
- Observable result 2.
- Generated artifacts are updated when applicable.
- Existing behavior remains unchanged unless explicitly listed in scope.
- For Angular/frontend UI data-flow changes: `ai/standards/angular-ui-data-flow.md`
  is satisfied, including service/facade data acquisition, signal-owned state,
  typed view-model boundaries, template/presentation separation, and
  invalidation-only Socket.IO usage.
- For backend/Runtime architecture-sensitive changes:
  `ai/standards/backend-node-nestjs-architecture.md` is satisfied, including
  thin transport handlers, typed DTO/read-model boundaries, narrowed raw data,
  adapter-owned IO, Runtime-owned truth, structured errors, shell-not-truth, and
  invalidation-only Socket.IO usage.

## Files Likely Affected

- `apps/backend/src/...`
- `apps/backend/test/...`
- `apps/frontend/src/app/...`
- `apps/frontend/src/app/core/graphql/operations/...`
- `apps/frontend/src/app/core/graphql/generated/...`
- `codegen.yml`
- Other files as needed by the chunk.

## Test Expectations

- Unit tests for changed service, resolver, controller, component, or helper behavior.
- E2E tests for cross-layer backend/API behavior.
- Frontend tests for visible UI or component behavior changes.
- Frontend architecture report for Angular/Runtime Action Center data-flow
  changes:
  `ai/commands/frontend-architecture-report.sh --json`.
- Backend architecture report for backend/Runtime/GraphQL/Socket.IO
  architecture-sensitive changes:
  `ai/commands/backend-architecture-report.sh --json`.
- Codegen/schema regeneration checks for GraphQL changes.
- Explicit note when no test changes are needed because the chunk changes docs, scripts, or configuration only.

## Validation Commands

Run the commands requested by the chunk. Runtime-owned validation defaults are
canonical; prefer the Runtime CLI/API profile gate instead of shell validation
wrappers:

```sh
node ai/runtime/dist/cli.js validation auto-profile --json
node ai/runtime/dist/cli.js validation execution-plan --profile runtime-intrinsic --tier chunk --changed-only --json
node ai/runtime/dist/cli.js validate --tier full
```

## Carry Forward

- If this chunk references unresolved runtime/governance debt in `Bad`, `Ugly`,
  or `Policy Enforcement`, project the relevant open ids from
  `ai/governance/registries/carry-forward-debt.yaml` here.
- The registry is canonical. This section is a human-readable projection, not a
  second source of truth.
- Mark each item as blocking or non-blocking and include its type when useful:
  warning, advisory, compatibility, pending_enforcement, observation, or
  follow_up.

## Expected Summary

Include:

- What changed.
- What was intentionally left untouched.
- Commands run and whether they passed.
- Any environment setup or permission reruns needed.
- Convention and acceptance-criteria self-check result.
- `git status`.
- `git diff --stat`.
