| name | ensure-tracking |
| description | Verify and complete all documentation for the current PRP phase before closing context, so the next session can continue seamlessly. |
| argument-hint | <prp-folder> |
| disable-model-invocation | true |
Ensure Tracking
PRP Folder: $ARGUMENTS
Verify and complete all documentation for the current phase before closing context. Run this when you feel the agent hasn't properly documented everything.
Purpose: Ensure the next agent session has complete context to continue seamlessly.
STEP 1: IDENTIFY CURRENT PHASE
Read {$ARGUMENTS}/_STATUS.md to find:
- Current phase number and name
- Current phase folder path
STEP 2: AUDIT COMPLETED.md
Read {current-phase}/COMPLETED.md and verify it contains:
Required Sections (Must Be Filled)
Changes Made (Must Be Complete)
Testing Instructions
If Any Section is Missing or Incomplete:
Fill it in now by reviewing:
- Git diff or recent changes
- The tasks from PLAN.md
- Your memory of what was done
STEP 3: AUDIT FIXES.md
Read {current-phase}/FIXES.md and verify:
For Each Fix Reported:
If Any Fix is Incomplete:
Fill it in now with the missing details.
If Status is Still "Pending" or "In Progress":
Either fix the issue or document why it wasn't fixed.
STEP 4: AUDIT HANDOFF.md
Read {current-phase}/HANDOFF.md and verify:
Required Sections (Must Be Filled)
If Any Section is Missing or Empty:
Fill it in now.
STEP 5: AUDIT _STATUS.md
Read {$ARGUMENTS}/_STATUS.md and verify:
If Not Updated:
Update it now to reflect phase completion.
STEP 5.5: AUDIT KNOWLEDGE BASE & PROJECT DOCS
Check if knowledge base AND project documentation were updated for this phase.
5.5.1 Determine if Updates are Required
KB and project doc updates are REQUIRED for EVERY phase (not just final phase):
- Knowledge can be lost between sessions
- Patterns established early should be documented immediately
- Gotchas discovered should be captured right away
Skip only if: Phase was purely bug fixes with no new patterns or decisions.
5.5.2 Audit Knowledge Base
Verify:
5.5.3 Audit Project Documentation
Verify the project's root documentation was updated:
AGENTS.md (durable facts only):
5.5.4 If Updates are Missing
Flag as issues:
- "Knowledge base not updated for phase {N}" → run
/update-knowledge-base {PRP path}
- "AGENTS.md not updated with durable facts (if any)"
Offer to run the documentation update now using /update-knowledge-base {PRP path}
5.5.5 Add to Tracking Report Output:
KNOWLEDGE BASE:
Topic updated: {topic-name} in {section}
Changes log entry added
Summary regenerated
Index up to date
PROJECT DOCUMENTATION:
AGENTS.md: Updated with {what} (durable facts only)
Or if missing:
KNOWLEDGE BASE:
No topic references this PRP — run /update-knowledge-base {PRP path}
PROJECT DOCUMENTATION:
AGENTS.md: Missing durable facts from this phase (if any)
STEP 6: CROSS-CHECK CONSISTENCY
Verify consistency across all files:
- Files mentioned in COMPLETED.md should match files in HANDOFF.md
- Fixes in FIXES.md should be summarized in HANDOFF.md
- Phase status in _STATUS.md should match HANDOFF.md verification
- Next phase in HANDOFF.md should match current phase in _STATUS.md
If Inconsistencies Found:
Fix them now to ensure single source of truth.
STEP 7: GENERATE TRACKING REPORT
After completing the audit, output:
========================================
TRACKING AUDIT COMPLETE
========================================
Phase: {N} - {Phase Name}
PRP: {$ARGUMENTS}
COMPLETED.md:
Summary filled
Data model changes documented
Files created listed
Files modified listed
Testing instructions provided
FIXES.md:
{N} fixes documented
All fixes resolved (no pending)
Code changes included
HANDOFF.md:
What was built summary
Implementation details
Decisions documented
Files summary complete
Next phase context provided
_STATUS.md:
Points to Phase {N+1}
Quick status updated
Last updated set
Knowledge Base:
Topic(s) updated
Index regenerated
Project Docs:
AGENTS.md updated with durable facts (or "No changes needed")
Consistency:
Files match across documents
Fixes summarized in handoff
Status aligned
========================================
READY TO CLOSE CONTEXT
Next session: /continue-prp {$ARGUMENTS}
========================================
If Issues Were Found and Fixed:
========================================
TRACKING AUDIT COMPLETE (WITH FIXES)
========================================
Issues Found and Fixed:
- COMPLETED.md: Added missing files modified section
- FIXES.md: Added code changes for Fix #2
- HANDOFF.md: Added context for next phase
- _STATUS.md: Updated to point to Phase 2
========================================
NOW READY TO CLOSE CONTEXT
Next session: /continue-prp {$ARGUMENTS}
========================================
QUICK CHECKLIST
Before closing context, all must be true:
COMPLETED.md
FIXES.md
HANDOFF.md
_STATUS.md
Knowledge Base
Project Docs
CRITICAL REMINDER
The next agent will ONLY have access to these files.
They will NOT have:
- Your memory of what happened
- The chat history
- Context about why decisions were made
Everything must be written down. If it's not documented, it didn't happen.