Skip to content

[AI] WASM dev docs abilities — block schemas and hook documentation via embedded SQLite #35

Description

@pluginslab

Goal

Give the AI access to WordPress block schemas and hook documentation via an embedded WASM/SQLite database (@pluginslab/wp-devdocs-wasm), so it answers developer questions with verified data instead of hallucinating.

Status

Partially implemented on the feature/wasm-sqlite-devdocs branch (not yet merged). Four abilities built and tested (11 tests including multi-turn chains).

What's done

  • search-wp-blocks — search Gutenberg blocks by keyword
  • get-block-schema — retrieve full schema for a specific block (attributes, supports, variations)
  • search-wp-hooks — search WordPress hooks (actions and filters)
  • get-hook-context — retrieve details for a specific hook (type, file, parameters)
  • Databases bundled inline via webpack browser entry point (no raw sql.js)
  • 11 tests in tests/abilities/devdocs-wasm.test.js (10 single-turn + 1 multi-turn chain)
  • ReAct agent fix for partial tool ID suffix matching

What's remaining

  • Merge the feature/wasm-sqlite-devdocs branch to main
  • IndexedDB caching — databases currently decoded fresh each session
  • Database refresh mechanism — update when block plugins change
  • Wire block schema lookups into block editor chat (Goal 8) so AI validates markup before saving

Key Files (on feature/wasm-sqlite-devdocs branch)

  • src/extensions/abilities/search-wp-blocks.js
  • src/extensions/abilities/get-block-schema.js
  • src/extensions/abilities/search-wp-hooks.js
  • src/extensions/abilities/get-hook-context.js
  • src/extensions/abilities/index.js — registers all four
  • webpack.config.js — browser added to conditionNames for WASM package resolution
  • src/extensions/services/react-agent.js — partial tool ID suffix matching fix
  • tests/abilities/devdocs-wasm.test.js — 11 tests

Technical Notes

  • Uses @pluginslab/wp-devdocs-wasm package (dynamic import, graceful degradation if not installed)
  • Database covers 121+ core Gutenberg blocks + WordPress hooks with verified schemas
  • See CLOUDFEST_HACKATHON.md Goal 9 for full context

Skills needed

React/JS, WASM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-mlAI/ML and LLM workhackathonCloudFest Hackathon 2026react-jsReact/JavaScript frontend worktestingTesting and QA

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions