Instruction Recommendation
Suggest .instructions.md files based on project context and stack.
When to Use
- Setting up .github/instructions/ for a new repository
- Matching WAF pillars to instruction files
- Recommending instructions for specific frameworks
- Configuring applyTo globs for targeted activation
Instruction Categories
| Category |
Examples |
ApplyTo Pattern |
| WAF Pillars |
waf-reliability, waf-security |
**/*.{ts,py,bicep} |
| Languages |
python-waf, csharp-waf |
**/*.py, **/*.cs |
| Frameworks |
fastapi-, aspnet- |
**/api/** |
| IaC |
bicep-, terraform- |
**/*.bicep, **/*.tf |
| AI |
rag-, prompt-, eval-* |
**/*.py |
Recommendation Process
INSTRUCTION_MAP = {
"python": ["python-waf.instructions.md"],
"typescript": ["typescript-waf.instructions.md"],
"csharp": ["csharp-waf.instructions.md"],
"bicep": ["bicep-best-practices.instructions.md"],
"fastapi": ["fastapi-patterns.instructions.md"],
"security": ["waf-security.instructions.md"],
"reliability": ["waf-reliability.instructions.md"],
"cost": ["waf-cost-optimization.instructions.md"],
}
def suggest_instructions(stack: list[str]) -> list[dict]:
suggestions = []
for tech in stack:
for key, files in INSTRUCTION_MAP.items():
if key in tech.lower():
for f in files:
suggestions.append({"file": f, "reason": f"Matches {tech}"})
# Always include WAF security
suggestions.append({"file": "waf-security.instructions.md", "reason": "Required for all projects"})
return suggestions
Setup in Repository
# .github/instructions/waf-security.instructions.md
---
description: Security patterns for AI applications
applyTo: "**/*.{ts,js,py,bicep,json,yaml,yml}"
---
[instruction content]
Troubleshooting
| Issue |
Cause |
Fix |
| Instructions not activating |
Wrong applyTo glob |
Check glob matches file extensions |
| Too many instructions loaded |
Broad globs |
Narrow applyTo to relevant paths |
| Conflicting guidance |
Multiple overlapping |
Deduplicate, set priority order |
| Instructions outdated |
No review cadence |
Review quarterly with stack changes |
Best Practices
| Practice |
Rationale |
| Start simple, add complexity when needed |
Avoid over-engineering |
| Automate repetitive tasks |
Consistency and speed |
| Document decisions and tradeoffs |
Future reference for the team |
| Validate with real data |
Don't rely on synthetic tests alone |
| Review with peers |
Fresh eyes catch blind spots |
| Iterate based on feedback |
First version is never perfect |
Quality Checklist
Related Skills
fai-implementation-plan-generator — Planning and milestones
fai-review-and-refactor — Code review patterns
fai-quality-playbook — Engineering quality standards
Source: frootai/frootai — distributed by TomeVault.
1---2name: frootai-frootai-fai-suggest-instructions3description: Instruction Recommendation4---56# Instruction Recommendation78Suggest .instructions.md files based on project context and stack.910## When to Use1112- Setting up .github/instructions/ for a new repository13- Matching WAF pillars to instruction files14- Recommending instructions for specific frameworks15- Configuring applyTo globs for targeted activation1617---1819## Instruction Categories2021| Category | Examples | ApplyTo Pattern |22|----------|---------|----------------|23| WAF Pillars | waf-reliability, waf-security | `**/*.{ts,py,bicep}` |24| Languages | python-waf, csharp-waf | `**/*.py`, `**/*.cs` |25| Frameworks | fastapi-*, aspnet-* | `**/api/**` |26| IaC | bicep-*, terraform-* | `**/*.bicep`, `**/*.tf` |27| AI | rag-*, prompt-*, eval-* | `**/*.py` |2829## Recommendation Process3031```python32INSTRUCTION_MAP = {33 "python": ["python-waf.instructions.md"],34 "typescript": ["typescript-waf.instructions.md"],35 "csharp": ["csharp-waf.instructions.md"],36 "bicep": ["bicep-best-practices.instructions.md"],37 "fastapi": ["fastapi-patterns.instructions.md"],38 "security": ["waf-security.instructions.md"],39 "reliability": ["waf-reliability.instructions.md"],40 "cost": ["waf-cost-optimization.instructions.md"],41}4243def suggest_instructions(stack: list[str]) -> list[dict]:44 suggestions = []45 for tech in stack:46 for key, files in INSTRUCTION_MAP.items():47 if key in tech.lower():48 for f in files:49 suggestions.append({"file": f, "reason": f"Matches {tech}"})50 # Always include WAF security51 suggestions.append({"file": "waf-security.instructions.md", "reason": "Required for all projects"})52 return suggestions53```5455## Setup in Repository5657```yaml58# .github/instructions/waf-security.instructions.md59---60description: Security patterns for AI applications61applyTo: "**/*.{ts,js,py,bicep,json,yaml,yml}"62---63[instruction content]64```6566## Troubleshooting6768| Issue | Cause | Fix |69|-------|-------|-----|70| Instructions not activating | Wrong applyTo glob | Check glob matches file extensions |71| Too many instructions loaded | Broad globs | Narrow applyTo to relevant paths |72| Conflicting guidance | Multiple overlapping | Deduplicate, set priority order |73| Instructions outdated | No review cadence | Review quarterly with stack changes |7475## Best Practices7677| Practice | Rationale |78|----------|-----------|79| Start simple, add complexity when needed | Avoid over-engineering |80| Automate repetitive tasks | Consistency and speed |81| Document decisions and tradeoffs | Future reference for the team |82| Validate with real data | Don't rely on synthetic tests alone |83| Review with peers | Fresh eyes catch blind spots |84| Iterate based on feedback | First version is never perfect |8586## Quality Checklist8788- [ ] Requirements clearly defined89- [ ] Implementation follows project conventions90- [ ] Tests cover happy path and error paths91- [ ] Documentation updated92- [ ] Peer reviewed93- [ ] Validated in staging environment9495## Related Skills9697- `fai-implementation-plan-generator` — Planning and milestones98- `fai-review-and-refactor` — Code review patterns99- `fai-quality-playbook` — Engineering quality standards100101---102> Source: [frootai/frootai](https://github.com/frootai/frootai) — distributed by [TomeVault](https://tomevault.io).103<!-- tomevault:4.0:skill_md:2026-06-15 -->