Execute complex Moodle plugin tasks with intelligent workflow management
Execute complex Moodle plugin tasks with intelligent workflow management. Use this for multi-component development requiring database schema, capabilities, mobile API, and upgrade path coordination.
/plugin marketplace add astoeffer/moodle-plugin-marketplace/plugin install moodle-dev-pro@astoeffer-dev-plugins/m:task [action] [target] [--type feature|bugfix|refactor|upgrade] [--priority high|medium|low] [--mobile]
Key behaviors:
📋 Feature: OAuth2 Inline Folder Browser
├── 🏗️ Architecture: Component design and integration
├── 🔒 Security: Capability and context validation
├── 💾 Database: XMLDB schema updates
├── 🌐 Web Services: Mobile API endpoints
└── ✅ Testing: PHPUnit and Behat coverage
📦 Component: Folder Browser UI
├── AMD modules (JavaScript)
├── Mustache templates
├── Language strings
├── CSS/SCSS styling
└── Accessibility compliance
✓ Create inline_browser.mustache template
✓ Refactor folderbrowser.js to remove modal
✓ Add view switcher functionality
✓ Implement context menu system
✓ Update language strings in lang/en/
// version.php updates
$plugin->version = 2024010100; // YYYYMMDDXX format
$plugin->requires = 2022112800; // Moodle 4.1+
$plugin->component = 'mod_nextcloudfolder';
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'v2.1.0';
// db/upgrade.php pattern
function xmldb_nextcloudfolder_upgrade($oldversion) {
global $DB;
$dbman = $DB->get_manager();
if ($oldversion < 2024010100) {
// Add new table or field
$table = new xmldb_table('nextcloudfolder_views');
// ... define structure
$dbman->create_table($table);
upgrade_mod_savepoint(true, 2024010100, 'nextcloudfolder');
}
}
// db/access.php pattern
$capabilities = [
'mod/nextcloudfolder:viewfolder' => [
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => [
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
],
],
];
// classes/external.php pattern
class external extends external_api {
public static function get_folders_parameters() {
return new external_function_parameters([
'cmid' => new external_value(PARAM_INT, 'Course module ID'),
]);
}
}
/m:task create "inline folder browser" --type feature --priority high --mobile
# Creates comprehensive task breakdown:
# - Database schema updates
# - AMD module refactoring
# - Template creation
# - Mobile API endpoints
# - Test coverage
/m:task fix "OAuth token refresh failure" --type bugfix --priority high
# Systematic bug resolution:
# - Root cause analysis
# - Fix implementation
# - Test case creation
# - Regression testing
/m:task refactor "PSR-12 compliance" --type refactor --priority medium
# Code quality improvement:
# - PHP CodeSniffer analysis
# - Automated fixing with PHPCBF
# - Manual review for complex cases
# - Verification with Moodle code checker
/m:task upgrade "add view preferences table" --type upgrade --priority medium
# Database migration:
# - XMLDB schema design
# - upgrade.php implementation
# - Data migration logic
# - Rollback considerations
# Moodle code checker
php admin/cli/check_database_schema.php
vendor/bin/phpcs --standard=moodle mod/nextcloudfolder/
vendor/bin/grunt eslint
# PHPUnit
vendor/bin/phpunit mod/nextcloudfolder/tests/
# Behat
vendor/bin/behat --tags @mod_nextcloudfolder
# Mobile testing
php admin/cli/webservice_test.php --function=mod_nextcloudfolder_get_folders
# Database queries
grep -r "get_records_sql" mod/nextcloudfolder/
# Check for N+1 queries and missing indexes
moodle_task_[timestamp]: Task overview and goals
moodle_phase_[1-5]: Major component milestones
moodle_subtask_[x.y]: Implementation details
moodle_tests_[type]: Test execution results
moodle_blockers: Issues requiring resolution
moodle_decisions: Architecture and design choices
# Session 1: Start feature
write_memory("moodle_task_oauth_inline", "Implement inline folder browser")
write_memory("moodle_phase_1", "UI transformation from modal to inline")
# Session 2: Continue
read_memory("moodle_task_oauth_inline")
think_about_collected_information()
# Resume from phase 1 completion...
// db/mobile.php
$addons = [
'mod_nextcloudfolder' => [
'handlers' => [
'coursecontent' => [
'delegate' => 'CoreCourseModuleDelegate',
'method' => 'mobile_course_view',
'offlinefunctions' => [],
],
],
],
];
// classes/output/mobile.php
public static function mobile_course_view($args) {
return [
'templates' => [
['id' => 'main', 'html' => $html],
],
'javascript' => $js,
'otherdata' => '',
];
}
Will:
Will Not:
/taskInicia um agente especializado para executar autonomamente tarefas complexas de pesquisa, investigação e análise. Processamento de informações em larga escala combinando múltiplas ferramentas, priorizando eficiência contextual.