Missing References - SKILL-STRUCTURE-AND-ROUTING and skill-workflow-notification
Reference: ${PAI_DIR}/skills/CORE/SKILL-STRUCTURE-AND-ROUTING.md from CONSTITUTION (a dozen lines down at bottom of the section)
I've seen this file mentioned but I'm not finding this file in the repo. Searched the code, but I'm not finding this file anywhere.
${PAI_DIR}/tools/skill-workflow-notification WorkflowName CORE
And additionally in the CORE SKILL file there is mention of a notification tool, that doesn't seem to exist?
Fixed in commit f8a04c3!
Summary
Both missing references have been resolved:
1. SKILL-STRUCTURE-AND-ROUTING.md → SkillSystem.md
The file SKILL-STRUCTURE-AND-ROUTING.md never existed - SkillSystem.md is the canonical skill structure document.
Updated 4 references:
.claude/Skills/CORE/CONSTITUTION.md(3 instances).claude/Skills/BrightData/SKILL.md(1 instance)
All now correctly point to SkillSystem.md.
2. skill-workflow-notification → SkillWorkflowNotification
The script exists in Kai but was missing from the PAI template repository.
Fixed by:
- Copied
SkillWorkflowNotificationfrom Kai to PAI's.claude/Tools/ - Updated references in
SKILL.mdandSkillSystem.md - Fixed path casing:
tools/→Tools/(proper Title Case) - Enhanced workflow routing instructions with dual notification pattern:
- Call notification script for observability tracking
- Output text notification for user visibility
The script is now available in PAI and properly documented.
Fix Verification & Root Cause Analysis
Status: ✅ VERIFIED - Issue is fully resolved in commit f8a04c3
Root Causes Identified
Root Cause 1: Broken File Reference
- Problem: Documentation referenced non-existent file
SKILL-STRUCTURE-AND-ROUTING.md - Impact: Users following docs would get file-not-found errors when looking for skill structure guidance
- Files affected:
.claude/Skills/CORE/CONSTITUTION.md(3 references).claude/Skills/BrightData/SKILL.md(1 reference)
- Solution: Renamed reference to canonical file
SkillSystem.md(which exists)
Root Cause 2: Missing Executable Script
- Problem: Workflow routing instructions referenced
${PAI_DIR}/tools/skill-workflow-notificationbut script didn't exist - Impact:
- Workflows couldn't emit observability signals
- Dashboard couldn't detect workflow activations
- Users get "command not found" errors when trying to use PAI slash commands
- Files affected:
.claude/Skills/CORE/SKILL.md(path & instructions).claude/Skills/CORE/SkillSystem.md(path & instructions)
- Solution: Added missing script to
.claude/Tools/SkillWorkflowNotificationwith proper shebang and documentation
Why This Was Breaking PAI Slash Commands
The skill system routing mechanism depends on this workflow notification pattern:
- Skill invokes a workflow
- Workflow calls
~/.claude/Tools/SkillWorkflowNotification WORKFLOWNAME SKILLNAME - Notification script outputs signal for observability system
- System recognizes workflow activation and routes correctly
Without the script: Workflows fail to notify → routing breaks → slash commands don't execute
Fix Details (Commit f8a04c3)
Path corrections:
${PAI_DIR}/tools/→~/.claude/Tools/(proper Title Case alignment)SKILL-STRUCTURE-AND-ROUTING.md→SkillSystem.md
Dual notification pattern introduced:
# 1. Call notification script for observability
~/.claude/Tools/SkillWorkflowNotification WORKFLOWNAME SKILLNAME
# 2. Output text notification for user visibility
echo "Running the **WorkflowName** workflow..."
Verification Steps
To verify the fix is working:
# 1. Check that the script exists
ls -la ~/.claude/Tools/SkillWorkflowNotification
# 2. Test it directly
~/.claude/Tools/SkillWorkflowNotification TestWorkflow TestSkill
# 3. Verify all doc references are correct
grep -r "SKILL-STRUCTURE-AND-ROUTING" ~/.claude/Skills/
# Should return 0 results
# 4. Test a PAI slash command (e.g., /paiupdate)
/paiupdate
# Should execute successfully
Lessons Learned
This bug illustrates three important patterns:
- Documentation references must point to real files - Consider a pre-commit check for reference validity
- Scripts referenced in docs must exist - Consider shipping all referenced tooling
- Path case sensitivity matters - Title Case conventions (
Tools/nottools/) should be enforced
Contribution by: PAI community member (verified on main branch, commit f8a04c3)