
ralph-autonomous
by salmanrrana
A local-first kanban board designed from the ground up for AI-assisted development
SKILL.md
name: ralph-autonomous description: Use this skill when Ralph is working autonomously through Brain Dump backlogs. Covers ticket selection, implementation patterns, and autonomous workflow management. license: MIT compatibility: opencode metadata: audience: developers workflow: autonomous
Ralph Autonomous Workflow
This skill guides Ralph when working autonomously through Brain Dump backlogs without direct user supervision.
Autonomous Mode Principles
Core Philosophy
- No User Input Required: Ralph makes decisions independently
- Context-Driven: Uses PRD and progress files for guidance
- Incremental Progress: One ticket per session, verify completion
- Self-Documenting: Logs all decisions and progress via MCP
Decision Framework
Ralph evaluates tickets based on:
- Priority (high > medium > low)
- Dependencies (foundational work first)
- Complexity (quick wins vs major features)
- Current Context (progress from previous sessions)
Standard Operating Procedure
Session Start
# 1. Load current context
read('plans/prd.json') # Get incomplete tickets
read('plans/progress.txt') # Previous session context
# 2. Analyze ticket landscape
list_tickets() # Current state overview
find_project_by_path() # Verify project context
Ticket Selection Algorithm
// Pseudo-code for Ralph's selection logic
function selectTicket(tickets: Ticket[]): Ticket {
// Filter: only incomplete tickets
const incomplete = tickets.filter((t) => !t.passes);
// Sort by priority, then dependencies
const sorted = incomplete.sort((a, b) => {
if (a.priority !== b.priority) {
return priorityOrder[a.priority] - priorityOrder[b.priority];
}
return dependencyCount(a) - dependencyCount(b);
});
// Choose optimal ticket
return sorted[0]; // Highest priority, least blocked
}
Work Execution Pattern
# 1. Initialize ticket work
start_ticket_work(selectedTicketId)
# 2. Implementation phase
# - Read existing code patterns
# - Follow project conventions
# - Write minimal, focused changes
# 3. Verification
pnpm test # Must pass
pnpm type-check # Must pass
pnpm lint # Should pass
# 4. Complete ticket
complete_ticket_work(ticketId, summary)
Intelligent Decision Making
When Stuck on Implementation
# Log the issue
add_ticket_comment(ticketId,
"Blocked: [specific issue]. Will continue with next ticket.",
"ralph",
"blocker")
# Move on (don't waste time)
return next_best_ticket()
Handling Dependencies
If selected ticket has unmet dependencies:
-
Check if dependency ticket exists
dependency_tickets = tickets.filter(t => selectedTicket.dependencies.includes(t.id) ) -
If dependency exists → Work on dependency first
-
If dependency missing → Create dependency ticket
Scope Creep Prevention
# Before starting implementation
verify_ticket_scope(ticket) {
estimated_time = estimate_complexity(ticket)
if (estimated_time > 4_hours) {
# Break into smaller tickets
split_ticket(ticket)
return smallest_piece()
}
}
Code Implementation Patterns
Read Before Writing
# Always understand existing patterns
find_similar_implementations(ticket.description)
read_existing_components(ticket.related_area)
Minimal Changes
- Only implement what's in acceptance criteria
- No "gold plating" or extra features
- Follow existing conventions exactly
Testing Requirements
// Every ticket must pass these checks
interface TicketCompletion {
tests_pass: boolean; // pnpm test succeeds
types_check: boolean; // pnpm type-check succeeds
acceptance_met: boolean; // All AC items verified
no_regressions: boolean; // No existing functionality broken
}
Progress Tracking
Session Logging
Ralph automatically logs:
# Start of session
add_ticket_comment("session-start",
`Ralph session started. Available tickets: ${count}`,
"ralph",
"session")
# Ticket decisions
add_ticket_comment(ticketId,
`Selected ticket: ${ticket.title}. Reason: ${reason}`,
"ralph",
"decision")
# Implementation progress
add_ticket_comment(ticketId,
`Completed: ${component}. Next: ${next_step}`,
"ralph",
"progress")
# Blockers and issues
add_ticket_comment(ticketId,
`Issue: ${problem}. Solution: ${approach}`,
"ralph",
"issue-resolution")
Progress Updates in File
# plans/progress.txt - persistent context
echo "$(date): Ralph completed ticket ${ticketId}" >> plans/progress.txt
echo "Next session context: ${next_priorities}" >> plans/progress.txt
Quality Assurance
Pre-Completion Checklist
Before calling complete_ticket_work():
const completion_checklist = {
code_quality: verify_style_conventions(),
error_handling: verify_error_boundaries(),
performance: no_performance_regressions(),
documentation: updated_docs_if_needed(),
testing: all_tests_passing(),
acceptance: all_criteria_met(),
};
if (!completion_checklist.all_true()) {
fix_remaining_issues();
}
Self-Correction
If Ralph makes mistakes:
- Detect through testing or review
- Log the issue transparently
- Correct immediately
- Document lessons learned
Emergency Procedures
MCP Server Down
# Fallback to manual workflow
if (!mcp_tools_available()) {
git checkout -b "feature/ralph-manual"
# Work without ticket tracking
# Update PRD manually when done
}
Database Issues
# Work offline if needed
if (!database_accessible()) {
create_local_branch()
implement_changes()
# Sync tickets when database recovers
}
Optimization Patterns
Learning from History
Ralph improves over time by analyzing:
- Previous implementation choices
- Common blockers and patterns
- Estimation accuracy
- Code quality feedback
Batch Operations
When multiple similar tickets exist:
// Batch similar work for efficiency
similar_tickets = find_similar_tickets(current);
if (similar_tickets.length > 1) {
implement_common_base();
complete_individual_variants();
}
Communication Style
Autonomous Updates
Ralph provides updates without being asked:
- Every 30 minutes during long tasks
- When major decisions are made
- When blockers are encountered
- Before moving to next ticket
Transparency
All decision-making is documented:
add_ticket_comment(ticketId,
`Decision: Chose approach X over Y because:
1. Performance: 50% faster
2. Maintainability: Less code
3. Compatibility: Works with existing system`,
"ralph",
"decision")
Session Completion
Final Status Report
When all tickets are complete:
echo "PRD_COMPLETE" # Signal completion
# Generate summary
add_ticket_comment("project-complete",
`All ${total_tickets} tickets completed.
Total time: ${elapsed_time}.
Key achievements: ${highlights}`,
"ralph",
"summary")
Handoff Preparation
# Prepare for next session
update_progress_file_with_next_steps()
identify_remaining_dependencies()
suggest_priorities_for_next_session()
Troubleshooting
Common Issues
- Ticket selection conflicts → Use priority matrix
- Implementation ambiguity → Choose simplest approach that meets AC
- Test failures → Fix before proceeding
- Scope creep → Split ticket or defer features
Recovery Patterns
- Never skip a ticket without logging why
- Always leave the codebase in a working state
- Document any temporary workarounds
This skill ensures Ralph works effectively and autonomously while maintaining high code quality and transparency.
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon