Skip to content

AAC Moodle Integration — Documentation, Skills, Privacy & UX#381

Open
PaulaRecaj wants to merge 1 commit into
Lamb-Project:pastorfrom
PaulaRecaj:pastor
Open

AAC Moodle Integration — Documentation, Skills, Privacy & UX#381
PaulaRecaj wants to merge 1 commit into
Lamb-Project:pastorfrom
PaulaRecaj:pastor

Conversation

@PaulaRecaj
Copy link
Copy Markdown

Summary
This PR enhances the AAC (Agent-Assisted Creator) agent with full Moodle CLI integration, including discoverable documentation, a dedicated query skill, privacy safeguards, and automatic timestamp formatting.

Changes

1. New: docs/moodle-cli.md — Complete reference of all 16 moodle-cli command groups (courses, users, grades, enrolments, assignments, forums, quizzes, calendar, messages, completion, files, cohorts, roles, site, generic call). The agent can discover commands via [lamb docs read moodle-cli]. Includes privacy rules and usage tips.

2. New: [skills/query_moodle.md]— Specialized skill activated with [lamb skill load query-moodle]. Requires a configured Moodle integration. Classifies commands as READ (auto-execute) vs WRITE (ask confirmation). Includes privacy rules with example refusal responses.

3. System prompt updates ([agent/loop.py]:

  • Added full moodle command listing (READ/WRITE/ESCAPE) to the default system prompt
  • Added TIMESTAMPS section: always convert Unix timestamps to readable dates automatically, never ask
  • Added PRIVACY section: never query another user by ID, prefer self-scoped commands, refuse unauthorized queries
  • Added tool labels for moodle, [integration.list/test/save/remove]
  • Added moodle summary handler and artifact extraction

4. Authorization fix ([authorization.py]: [resolve_action_key()] now correctly returns "moodle" for passthrough commands (instead of ["moodle.course"], ensuring the "moodle": "auto" policy applies properly.

5. Router update ([router.py]: Added session titles for setup-moodle and [query-moodle] skills.

6. Related skill updates:

  • [setup_moodle.md]: Now suggests loading [query-moodle] after setup; added privacy reminder

  • [about_lamb.md]: Added "Moodle data queries" with privacy notice to capabilities list

7. Docs index (docs/index.md): Added moodle-cli entry to the documentation index table.

Privacy Design
The moodle-cli runs with the authenticated user's Moodle token. The agent is instructed to:

  • Never query another user by ID ([--user-id] params restricted to self)
  • Prefer self-scoped commands ([moodle user me] over [moodle user get ])
  • Refuse requests for other users' private data (grades, profile, messages)
  • Only exception: [moodle enrol list-users] (teacher context)

UX Improvement
Unix timestamps ([duedate: 1744320000]) are now automatically converted to human-readable dates ("Apr 10, 2026 14:30") without asking the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant