(match)
| 149 | # Pattern 2: Direct markdown/document references (forms.md, reference.md, etc.) |
| 150 | # Matches phrases like "see reference.md" or "read forms.md" |
| 151 | def replace_doc_path(match): |
| 152 | prefix = match.group(1) # e.g., "see ", "read " |
| 153 | filename = match.group(2) # e.g., "reference.md" |
| 154 | suffix = match.group(3) # e.g., punctuation |
| 155 | |
| 156 | abs_path = skill_dir / filename |
| 157 | if abs_path.exists(): |
| 158 | # Add helpful instruction for Agent |
| 159 | return f"{prefix}`{abs_path}` (use read_file to access){suffix}" |
| 160 | return match.group(0) |
| 161 | |
| 162 | # Match patterns like: "see reference.md" or "read forms.md" |
| 163 | pattern_docs = r"(see|read|refer to|check)\s+([a-zA-Z0-9_-]+\.(?:md|txt|json|yaml))([.,;\s])" |
nothing calls this directly
no outgoing calls
no test coverage detected