RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/WisdmLabs/moodle-local_edwiserreports-free

Cursor rule

.cursor/rules/moodle-ajax-and-js-integration.mdc

[object Object]

Cursor rules

Quality

50/100

Scores the file, not the repository.

Length

131 words

5 headings · 1 code blocks

Repository

4

— · pushed 2 days ago

Last changed

3 days ago

First indexed 3 days ago.
WisdmLabs/moodle-local_edwiserreports-free/.cursor/rules/moodle-ajax-and-js-integration.mdcRawGitHub
1---
2description:
3globs:
4alwaysApply: false
5---
6---
7name: Moodle AJAX and JavaScript Integration
8---
9 
10# Moodle AJAX and JavaScript Integration
11 
12## Purpose
13Ensure robust, secure, and maintainable integration between PHP and JavaScript in Moodle.
14 
15## Instructions
16- Use `$PAGE->requires->js()` to load JS modules
17- Use AMD modules for all new JS code
18- Use Moodle's AJAX API for server communication
19- Validate and sanitize all AJAX inputs in PHP
20- Return JSON responses using Moodle's output functions
21- Use `sesskey` for CSRF protection in AJAX requests
22- Document JS/PHP interfaces and data contracts
23 
24## Examples
25```php
26// File: ./amd/src/myplugin.js
27define(['jquery'], function($) {
28 // JS code here
29});
30 
31// File: ./ajax.php
32require_sesskey();
33$param = required_param('id', PARAM_INT);
34echo json_encode(['result' => 'ok']);
35```
36 
37## Exceptions
38- Legacy JS may use YUI modules
39- Inline JS allowed only for critical fixes
40 

Sections

  • Moodle AJAX and JavaScript Integration
  • Purpose
  • Instructions
  • Examples
  • Exceptions

What it covers

agent-behaviour

Stack — with the evidence

javascript

(1.00)

Glob targeting

  • [object Object]

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
WisdmLabs
Language
—
License
—
Archived
no

All configs in this repo

Also in WisdmLabs/moodle-local_edwiserreports-free

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-configuration-management.mdc · 4Cursor rulesjavascriptagent-behaviour36/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-database-patterns.mdc · 4Cursor rulesjavascriptstyledatabaseagent-behaviour54/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-error-handling.mdc · 4Cursor rulesjavascriptagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-events-and-callbacks.mdc · 4Cursor rulesjavascriptagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-file-and-media-handling.mdc · 4Cursor rulesjavascriptagent-behaviour36/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-internationalization.mdc · 4Cursor rulesjavascriptagent-behaviour36/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-performance-optimization.mdc · 4Cursor rulesjavascriptperformanceagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-php-coding-standards.mdc · 4Cursor rulesjavascriptagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-plugin-structure.mdc · 4Cursor rulesjavascriptarchagent-behaviour54/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-scheduled-tasks.mdc · 4Cursor rulesjavascriptagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-security-practices.mdc · 4Cursor rulesjavascriptsecurityagent-behaviour50/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-testing-and-quality.mdc · 4Cursor rulesjavascripttesttesting-strategyagent-behaviour54/1003 days ago
WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-web-services-and-api.mdc · 4Cursor rulesjavascriptapiagent-behaviour50/1003 days ago
Diff against .cursor/rules/moodle-configuration-management.mdc Diff against .cursor/rules/moodle-database-patterns.mdc Diff against .cursor/rules/moodle-error-handling.mdc Diff against .cursor/rules/moodle-events-and-callbacks.mdc Diff against .cursor/rules/moodle-file-and-media-handling.mdc Diff against .cursor/rules/moodle-internationalization.mdc Diff against .cursor/rules/moodle-performance-optimization.mdc Diff against .cursor/rules/moodle-php-coding-standards.mdc Diff against .cursor/rules/moodle-plugin-structure.mdc Diff against .cursor/rules/moodle-scheduled-tasks.mdc Diff against .cursor/rules/moodle-security-practices.mdc Diff against .cursor/rules/moodle-testing-and-quality.mdc Diff against .cursor/rules/moodle-web-services-and-api.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack