Syntax
Description
Thefeedback relocate command updates the anchor location of a feedback entry when the original anchor has become stale or inaccurate due to spec changes.
When you relocate feedback:
- A new anchor is created at the specified line
- The original location is preserved in
anchor.original_location - Anchor status is set to
"relocated" - The
updated_attimestamp is updated - Changes are exported to JSONL
- Feedback shows as stale but content still exists in spec
- Line numbers shifted due to spec edits
- You know the correct new location for the feedback
- Anchor needs manual correction
Arguments
The feedback ID to relocateExample:
FB-004The feedback entry whose anchor needs updating.Options
New line number for the anchorExample:
--line 50Must be a valid positive integer within the spec’s line range.Examples
Relocate Stale Anchor
Fix a stale anchor by moving it to the correct line:Expected output
Expected output
Relocate After Spec Edit
After adding content that shifted line numbers:Expected output
Expected output
Relocate Multiple Anchors
Fix several stale anchors:Expected output
Expected output
Invalid Line Number
Attempt to relocate to invalid line:Expected output
Expected output
Non-Existent Feedback
Attempt to relocate feedback that doesn’t exist:Expected output
Expected output
JSON Output
Get machine-readable output:JSON output
JSON output
anchor_statusis now"relocated"original_locationpreserves the original line 38- New
line_numberis 50 updated_attimestamp reflects the relocation
What Happens During Relocation
Create new anchor
A new anchor is generated at the specified line, including:
- New line number
- Updated section heading
- New text snippet
- Context before/after
Preserve original
Original location is saved in
anchor.original_location:- Original line number
- Original section heading
Understanding Relocated Status
After relocation, the feedback anchor has"relocated" status:
valid
Original anchor
- Never moved
- Content unchanged
- No original_location
relocated
Manually updated
- Moved to new line
- Original preserved
- Intentional update
stale
Needs attention
- Content changed
- Location uncertain
- Requires relocation
relocated status indicates:
- The anchor was manually updated (not stale detection)
- The original location is preserved for audit trail
- The feedback is now accurately anchored
Common Workflows
Fix Stale Anchors
After Major Spec Update
Calculate New Line After Insertion
If you inserted 10 lines at line 20:Interactive Relocation
Review and relocate interactively:Scripting Examples
Bulk Relocate with Mapping
If you know the line number changes:Calculate Offset Relocation
If all lines shifted by same amount:Generate Relocation Plan
Finding the Correct Line
Method 1: Search by Snippet
Method 2: Search by Section
Method 3: Manual Review
Common Questions
Can I relocate an already relocated anchor?
Can I relocate an already relocated anchor?
Yes, you can relocate feedback multiple times. Each relocation updates the line number but preserves the original location from the first creation.The
original_location always refers to the first anchor location.How do I know what line to relocate to?
How do I know what line to relocate to?
- Show the feedback to see the snippet:
- Search the spec for that content:
- Use the line number from grep output
Can I relocate feedback to a different spec?
Can I relocate feedback to a different spec?
No, relocation only changes the line number within the same spec. To move feedback to a different spec, you must:
- Dismiss the old feedback
- Create new feedback on the new spec
What happens to original_location after multiple relocations?
What happens to original_location after multiple relocations?
It always preserves the very first location where feedback was created, not intermediate relocations. This maintains the complete history.
Can I relocate valid anchors?
Can I relocate valid anchors?
Yes, technically you can relocate any feedback, not just stale ones. But it’s usually only necessary for stale anchors. Relocating a valid anchor would change its status to “relocated”.
Is there a way to undo a relocation?
Is there a way to undo a relocation?
Not directly. To undo:However, the status will still show “relocated” not “valid”.
Troubleshooting
Error: Invalid line number
Error: Invalid line number
Cause: Line number is less than 1, not a number, or exceeds spec lengthSolution:
Check spec length:Ensure line number is within range:
Error: Feedback not found
Error: Feedback not found
Cause: The feedback ID doesn’t existSolution:
List all feedback:Use correct ID
Error: Spec not found
Error: Spec not found
Cause: The spec referenced by feedback doesn’t existSolution:
This shouldn’t happen if feedback exists. Check database integrity:
Relocation succeeded but anchor still shows as stale
Relocation succeeded but anchor still shows as stale
Cause: Content at new line may not match expectedSolution:
Verify the new location:Status should be “relocated”, not “stale”. If still stale, you may have chosen wrong line.
Can't calculate correct line number after major spec rewrite
Can't calculate correct line number after major spec rewrite
Cause: Too many changes to accurately map old to new lineSolution:
Consider dismissing old feedback and creating new:
Related Commands
feedback stale
Find stale anchors
feedback show
View feedback details
feedback dismiss
Dismiss feedback
spec show
View spec content
feedback list
List all feedback
Next Steps
Feedback System Concept Guide
Learn more about the feedback system and anchor management

