---
name: requirement-feature-mapping
description: Generate candidate-only mappings from requirement inputs or standalone problem statements to feature leaves.
---

# Requirement Feature Mapping

Use this Skill when a coding agent must understand a requirement and propose how it maps to product features.

## Boundary

- Read the explicit context package from `.nucleus/context/<workflowRunId>.json`.
- In `pms-driven` mode, read only declared `docs/requirement/**` artifacts with `readPolicy=read-only`.
- In `standalone-assistant` mode, require an explicit local problem statement in context.
- Scan existing `docs/features/**/feature.md` files as product feature candidates.
- Write only candidate evidence under `.nucleus/runs/<workflowRunId>/`.
- Return `NEEDS_HUMAN_REVIEW` when the mapping candidate is generated.
- Return `FAILED_BLOCKED` for missing inputs, protected writes, legacy paths, path escape, or schema failures.

This Skill does not write `docs/features/**`, does not write `docs/requirement/**`, and does not create tasks, commits, pushes, PRs, releases, or defect state changes.

## 人审前预审

请求 `mapping-candidate-review` 人工评审前，必须先按 `subagentPreReview` 调度独立 reviewer 子代理；未取得“材料可提交人工审查”预审结论时，不得请求人工批准映射。

## Runtime

```bash
python3 skills/requirement-feature-mapping/scripts/requirement_feature_mapping.py map \
  --repo-root <target-repo> \
  --context <target-repo>/.nucleus/context/<workflowRunId>.json
```

The runtime imports only packaged Skill assets and `skills/_shared/nucleus_runtime/`; it does not import root `harness/` or root `scripts/`.
