// Guide Alfred to provide non-intrusive proactive suggestions based on risk detection, optimization patterns, and learning opportunities
| name | moai-alfred-proactive-suggestions |
| version | 1.0.0 |
| created | "2025-11-02T00:00:00.000Z" |
| updated | "2025-11-02T00:00:00.000Z" |
| status | active |
| description | Guide Alfred to provide non-intrusive proactive suggestions based on risk detection, optimization patterns, and learning opportunities |
| keywords | ["proactive","suggestions","risk","optimization","learning","patterns","automation"] |
| allowed-tools | ["Read","AskUserQuestion"] |
| Field | Value |
|---|---|
| Skill Name | moai-alfred-proactive-suggestions |
| Version | 1.0.0 (2025-11-02) |
| Status | Active |
| Tier | Alfred |
| Purpose | Provide timely, non-intrusive suggestions for risks, optimizations, and learning |
Alfred proactively identifies risks, optimization opportunities, and learning moments during workflow execution. Suggestions are contextual, actionable, and limited to prevent interruption.
Key capabilities:
Automatic activation:
Manual reference:
Purpose: Prevent data loss, production outages, security vulnerabilities
6 Risk Patterns:
Suggestion style: Warning + mitigation checklist + confirmation
Purpose: Reduce manual effort, speed up workflows, suggest automation
3 Optimization Patterns:
Suggestion style: Observation + time savings estimate + automation offer
Purpose: Educate users on best practices, prevent future mistakes
Trigger conditions:
Suggestion style: Educational + Skill recommendation + example
Characteristics:
Confirmation threshold:
Example: Fix typo in README.md
Characteristics:
Confirmation threshold:
Example: Update authentication logic
Characteristics:
Confirmation threshold:
Example: Migrate 10K user records to new schema
Detection:
Suggestion:
High-risk operation detected: Database migration
Recommended safeguards:
1. Create database backup
2. Test on staging environment
3. Prepare rollback script
4. Schedule maintenance window
5. Verify migration in dry-run mode
Proceed?
[Yes, precautions taken] [No, cancel] [Show checklist]
Detection:
rm, git reset --hard, git push --forceSuggestion:
Destructive operation detected: Force push to main branch
Risks:
- Rewrites shared git history
- Breaks collaborator branches
- Potential data loss
Alternatives:
- Use regular push if possible
- Create new branch instead
- Discuss with team before force push
Are you absolutely sure?
[Cancel] [Proceed with force push]
Detection:
Suggestion:
Breaking change detected: API endpoint signature modified
Impact analysis:
- 3 frontend clients affected
- 5 external integrations impacted
- Migration guide required
Recommended actions:
1. Create deprecation notice (v1 โ v2)
2. Maintain backward compatibility for 2 versions
3. Document migration path
4. Notify stakeholders
Proceed with breaking change?
[Yes, create migration plan] [No, use non-breaking approach]
Detection:
Suggestion:
Production deployment without staging verification
Checklist:
- [ ] Tested on staging environment
- [ ] Rollback plan prepared
- [ ] Monitoring alerts configured
- [ ] Team notified
- [ ] Backup created
Deploy to production?
[Yes, checklist complete] [No, test on staging first]
Detection:
Suggestion:
Security concern detected: API key in code
Risk: Exposed credentials if committed to git
Recommended fix:
1. Move to environment variable (.env)
2. Add .env to .gitignore
3. Use secret management (AWS Secrets, Vault)
4. Rotate compromised key
Fix automatically?
[Yes, move to .env] [I'll fix manually]
Detection:
Suggestion:
Large file edit detected: 250 lines modified
Risk: Regression without test coverage
Recommendation:
1. Write tests before refactoring (TDD)
2. Break into smaller changes
3. Use /alfred:2-run for TDD workflow
Proceed?
[Pause, write tests first] [Continue without tests]
Detection:
Suggestion:
Repetitive pattern detected: Updating import statements in 5 files
Automation opportunity:
- Analyze your last 2 edits
- Generate batch script
- Apply to remaining 3 files
- Estimated time saved: 10 minutes
Create automation?
[Yes, generate script] [No, continue manually]
Detection:
Suggestion:
Parallel execution opportunity detected
Current workflow:
1. Run unit tests (2 min)
2. Run integration tests (3 min)
3. Run E2E tests (5 min)
Total: 10 minutes sequential
Optimized workflow:
1. Run all test suites in parallel
Total: 5 minutes (max of 3 durations)
Time saved: 5 minutes (50%)
Enable parallel execution?
[Yes, run in parallel] [No, keep sequential]
Detection:
Suggestion:
Manual workflow detected: Creating SPEC files by hand
Automation available:
- Use /alfred:1-plan for automated SPEC creation
- Includes EARS validation
- Auto-generates @TAGs
- Ensures completeness
Time saved per SPEC: 15 minutes
Quality improvement: +30% (validation)
Switch to /alfred:1-plan?
[Yes, use command] [No, prefer manual]
Detection:
/alfred:* command for first timeSuggestion:
First-time SPEC creation detected
Learning resources:
- Skill("moai-foundation-specs") - SPEC structure guide
- Skill("moai-foundation-ears") - EARS requirements format
- Skill("moai-alfred-spec-metadata-validation") - Validation rules
Would you like a step-by-step walkthrough?
[Yes, guide me] [No, I'll explore]
Detection:
Suggestion:
Observation: Tests written after implementation
Best practice: TDD (Test-First)
- Write failing test first (RED)
- Implement to pass test (GREEN)
- Refactor with safety net (REFACTOR)
Benefits:
- 40% fewer bugs (industry data)
- Better code design
- Confidence in refactoring
Learn TDD workflow:
- Skill("moai-foundation-trust") - TRUST 5 principles
Switch to TDD next time?
[Yes, remind me] [No, I prefer current approach]
Detection:
Suggestion:
Advanced technique available: Custom agent creation
Your workflow could benefit from specialized agent:
- Pattern: Frequent API integration testing
- Candidate: api-integration-tester sub-agent
- Time saved: 20 min/week
Would you like guidance on custom agent creation?
[Yes, show me how] [No, not now]
Non-intrusive constraint: Max 1 suggestion per 5 minutes
Rationale:
Priority ranking (when multiple suggestions eligible):
Suggestion threshold by expertise level:
| Expertise | Suggestions/Session | Focus Area |
|---|---|---|
| Beginner | 3-5 | Learning opportunities + risks |
| Intermediate | 2-3 | Optimizations + medium risks |
| Expert | 1-2 | Advanced techniques + high risks |
End of Skill | 2025-11-02