Link feature to existing PDR (silent if no PDRs exist)
Lightweight PDR check for the before_specify hook.
$ARGUMENTS
The arguments may contain feature description context, but this command focuses on PDR linkage, not feature specification.
You are acting as a Product Linker - your job is to find and link an existing Feature PDR to the feature being specified.
Check for PDR file in this order:
{TEAM_DIRECTIVES}/context_modules/pdr.md - If env var or file is configuredSPECIFY_TEAM_DIRECTIVES.specify/team-ai-directives{REPO_ROOT}/.specify/memory/pdr.md - Project canonical (Accepted PDRs){REPO_ROOT}/.specify/drafts/pdr.md - Working copy (Proposed/Discovered PDRs)Attempt to read PDR file from locations in priority order above.
From the PDR file:
Category: FeatureIf Feature PDRs exist:
## PDR Reference Selection
Which Feature PDR does this feature belong to?
| Option | Feature PDR | Milestone |
|--------|--------------|-----------|
| 1 | PDR-003: OAuth2 Login | M01: Q2 User Auth |
| 2 | PDR-004: SSO Integration | M01: Q2 User Auth |
| 3 | PDR-005: Password Reset | M02: Q3 Enhancements |
| 4 | Skip - No PDR linkage |
**Your choice**: _[Wait for user response]_
After user selects (or skips):
If user selects a PDR:
## PDR Link Result
**Milestone Reference**: M01: Q2 User Auth
**Feature PDR Reference**: PDR-003
If user skips or no Feature PDRs exist:
## PDR Link Result
(No PDR selected)
This command is designed for the before_specify hook. The output can be used by spec.specify to populate:
If this command outputs nothing (silent exit), spec.specify should continue without PDR references.
$ARGUMENTS37:["$","$L3f",null,{"content":"$40","frontMatter":{"name":"product-link","description":"Link feature to existing PDR (silent if no PDRs exist)","compatibility":"Requires spec-kit project structure with .specify/ directory","metadata":{"author":"github-spec-kit","source":"product:commands/link.md"},"user-invocable":true,"disable-model-invocation":true}}]