Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/09/2026 in all areas

  1. Hi @ryan and the ProcessWire community, Thank you for starting this amazing discussion. Like many of you, I've been deeply exploring how to make AI agents more effective within the ProcessWire ecosystem. Hearing about the new Agent Tools and the API.md initiative is incredibly exciting! ProcessWire’s predictability and clear architecture make it exceptionally pattern-friendly for AI agents. Building on this exact philosophy, I have been developing two complementary open-source packages: processwire-console and processwire-boost. I wanted to share my architecture and findings, as they align perfectly with the goals discussed here. 1. API.md vs. AGENTS.md (Data Documentation vs. Orchestration) @ryan your idea of adding API.md files to Fieldtype modules is brilliant and absolutely necessary. It solves the issue of the AI not knowing the exact CRUD syntax for specific module APIs. However, as @szabesz noted regarding directory structures (.agents/ vs global contexts), managing when the AI reads this context is equally critical. If we feed everything to the AI at once, we waste tokens and dilute the context window. I see API.md and AGENTS.md as completely complementary: API.md (The Knowledge): Native, module-level API documentation focusing purely on syntax and dataset interaction. AGENTS.md / map.json (The Librarian & Routing): Placed in the project root, this acts as a trigger-based router. Instead of holding documentation, it lists installed modules and triggers (e.g., "Use when working with HTMX components... read site/modules/Htmx/AGENTS.md" or "Working with Repeater? read site/modules/FieldtypeRepeater/API.md"). mcp.json: The configuration for integrating ProcessWire's context securely directly into Model Context Protocol (MCP) servers locally. By combining ProcessWire's native API.md documents with a root-level AGENTS.md / map.json router, we can keep the AI deeply focused. It drastically reduces token usage and limits hallucinations because the AI only reads the specific API.md when it is actively working on that module's scope. 2. Giving AI "Hands": The Console & Migrations While having readable documentation is half the battle, the other half is allowing the AI to safely interact with the system. I see that AgentTools natively introduces a very cool migration runner (--at-migrations-apply) and a dedicated CLI file for agents. This is a massive step forward to prevent AI from executing dangerous ad-hoc scripts. To build on this paradigm, my processwire-console package reimagines this CLI experience utilizing a full Symfony Console architecture. This gives both developers and AI agents strict, typed, and predictable commands, along with a dedicated migration architecture. Instead of editing a single agent script, the AI can seamlessly run independent commands like: php vendor/bin/wire make:migration AddBlogFields php vendor/bin/wire migrate:status php vendor/bin/wire migrate This provides a Laravel/Symfony-style schema migration system that AI agents understand natively. It allows them to scaffold entire schemas predictably without breaking the production environment. processwire-boost: To give the AI safe, read-only oversight, I integrated an MCP (Model Context Protocol) server over JSON-RPC. Agents can natively execute tools like pw_schema_read (to understand the exact templates/fields currently installed) or pw_query to fetch ProcessWire data securely before deciding how to proceed. Repositories & Working Examples If you're interested in giving these tools a spin or looking at how the AI components communicate with each other, they are open-source here: processwire-boost: https://github.com/trk/processwire-boost processwire-console: https://github.com/trk/processwire-console For a real-world example of a module that seamlessly integrates with this AI context architecture, you can check out the Htmx module. It not only includes its own localized AGENTS.md, but it also actively extends processwire-console by injecting its own CLI commands. For example, AI agents can scaffold native UI components directly from the terminal: php vendor/bin/wire make:htmx-ui Card Htmx Module: https://github.com/trk/Htmx @ryan your approach with API.md in the core modules is the final missing piece. When ProcessWire natively exposes its capabilities clearly through text, architectures like processwire-boost with intelligent context indexing will allow agents to seamlessly crawl, understand, and reliably act upon the CMS with unprecedented accuracy.
    4 points
  2. Guys, I don't know where to put this, so I'll post it here. Maybe someone will need the Uikit PW design system for use on your development. Attached file. Online here. AdminThemeUikit-DesignSystemUI.html
    3 points
  3. Hey folks, we at frameless Media often develop across multiple devices – laptop, tablet, sometimes even from a phone with an AI coding assistant. Git is our single source of truth, but getting those changes onto a staging or production server has always been annoying. Especially on shared hosting where there's no SSH, no git, and git-based FTP via YAML configs is more hassle than it's worth. We also frequently need to test new modules directly on shared hosting environments where the server setup differs from our local machines. Manually uploading files after every push? No thanks. So we built GitSync. 🎯 TL;DR: ✅ Link any installed module to its GitHub repo ✅ See all branches and their latest commits ✅ One-click sync – only changed files are downloaded ✅ GitHub Webhook support – auto-sync on every push ✅ Works on shared hosting – no git, no SSH, no cron ✅ Private repo support via GitHub Token What's the difference to ProcessUpgrade? ProcessUpgrade is great for updating published modules from the PW modules directory. But it tracks releases, not branches. During development, when you're pushing to `develop` or `feature/xyz` ten times a day, you need something different. That's where GitSync comes in. 🚀 How it works Install the module, add your GitHub Token (optional for public repos) Go to GitSync > Add Module, pick any installed module from the dropdown GitSync searches GitHub for matching repositories automatically Link the module to a repo + branch – done From now on, you can sync with one click. GitSync compares file hashes locally and remotely (using the same SHA1 blob hashing that git uses internally) and only downloads what actually changed. No full re-downloads, minimal API usage. Want it fully automatic? Set up a GitHub Webhook – enter a secret in the module config, point the webhook to `https://yoursite.com/gitsync-webhook/`, and every push triggers an automatic sync. The module overview shows a ⚡ webhook badge on auto-synced modules so you always know what's wired up. The real power: remote development with AI 📱 You're on the train, phone in hand, chatting with Claude via the Claude app. Claude writes code, commits to a feature branch on GitHub. GitSync picks up the webhook and syncs the module to your dev server. Automatically. You open the edited webpage on your phone, check the result, give feedback, iterate. The entire development loop without ever opening a laptop. 🤯 This works just as well for teams: multiple developers push to GitHub from different machines, and the staging server always reflects the latest state – no manual deploys, no SSH sessions, no FTP. We've been using a prototype internally for a few weeks now and it's become part of our daily workflow – especially the webhook auto-sync is something we don't want to miss anymore. As proof of concept we built the public release entirely as described above 😃 Technical details for the curious The differential sync works like GIT itself: every file's content is hashed as `sha1("blob {size}\0{content}")`. GitHub's Trees API returns these hashes for the entire branch in a single request. GitSync computes the same hash locally. Matching hash = identical file = skip. Requirements ProcessWire >= 3.0 and PHP >= 7.4 with cURL Module and Docs 👉 GitHub: https://github.com/frameless-at/GitSync 👉 Module Directory: https://processwire.com/modules/git-sync/ Would love to hear your thoughts, ideas, and edge cases we might not have considered! Cheers, Mike
    3 points
  4. @ukyo Thanks for your awesome work with those modules, really impressive what you are building, and it's a big help for improving the AI friendliness of ProcessWire. The AgentTools module readme is now linking to your boost project as well. Glad you like the API.md files. Admittedly it was not my idea, but I asked Claude what would be helpful and he said these API.md files, plus an abbreviated sitemap json file so that it can get a big picture overview of a PW installation at a glance. That sitemap feature was actually added to the AgentTools module today. Several API.md files have been added to the core today as well. For Fieldtypes that don't have their own directory, they are in a combined /wire/modules/Fieldtype/API.md file. We're also adding dedicated Field classes specific to each Fieldtype, which will improve field documentation but also allow for custom field API methods separate from the Fieldtype (where useful).
    2 points
  5. Thanks! Yeah I had deleted my first account after I got 100k followers... don't ask why. Then on my second account @somartist2 I tried to leave 2-3 times but then reactivated the account. And finally I did it. I'm on bluesky now, and still on Instagram and other platforms. No I didn't realize, but yeah I was very active for many years answering and helping many. It's great to hear tho. 🙂 Oh @ryan, thanks for the warm welcome back. Yeah I went on a long journey, glad you been following me. Great to see you're still running this thing haha. And now even using llm's! Yeah OMG so many names that I almost forgot about. I'm an old man now hehe.
    1 point
  6. @Joachim Exactly, when you use wireRenderFile() (or include), the variable $page remains the current page being viewed in the browser—in this case, the Home page. Since your Repeater fields live on the child pages (the modules), $page->introimg_field is looking at the Home page, finding nothing, and returning an empty object. When you loop through your child pages to render them as components, pass the specific child page into the options array of wireRenderFile. foreach($page->children() as $component) { // We pass the $component page object into the file echo wireRenderFile("components/{$component->template->name}.php", [ "item" => $component ]); } Inside the child (module) template: <section id="<?php echo $item->name; ?>" class="module"> <div class="landing_images"> <?php foreach($item->introimg_field as $intro_image): ?> <a href="<?php echo $intro_image->page_picker->url; ?>"> <h3><?php echo $intro_image->title; ?></h3> <img src="<?php echo $intro_image->image->url; ?>" alt="<?php echo $intro_image->description; ?>"> </a> <?php endforeach; ?> </div> </section> This should give you the correct array.
    1 point
  7. Hi @Joachim the most common reason a foreach loop "fails" silently is that the array/WireArray being looped over is empty. Have you tried to test $page->introimg_field via var_dump? oh and, your images are loaded via css:
    1 point
  8. Hi all, sorry haven’t been around Processwire in a while as I’ve been doing games and AI ethics work mostly these days. If you want some more things to read and hear then check out my podcast on the subject or my article about the end of programming…. Yep 🫠 Machine ethics podcast Programming is dead, we’re all code engineers now
    1 point
  9. If you love the simplicity of ProcessWire's API but want the reactive, SPA-like feel of modern frontend frameworks without writing complex JavaScript, this module bridges that gap. It brings native Server-Side Component state hydration, Out-Of-Band (OOB) swaps, and strict security to your ProcessWire application using HTMX. 🚀 What does it do? This module transforms how you write frontend components in ProcessWire: True Stateful Backend Components: It introduces Component and Ui base classes. Your PHP components automatically rehydrate their state (variables, dependencies, $page assignments) between HTMX AJAX requests! No need to manually parse POST payloads. Auto-Discovery: Just place your components in your site directories. The module automatically discovers and securely namespaces them (Htmx\Component and Htmx\Ui). Zero-Javascript Reactivity: You can handle form submissions, counters, validation, and multi-field updating dependencies directly from PHP using HTMX attributes. Cryptographic Security: The module uses strict HMAC-SHA256 signatures with TTL (Time-To-Live). This guarantees that bad actors cannot modify state payloads or trigger invalid endpoint logic in the browser. WebSockets & SSE Ready: It has built-in helpers to easily hook Server-Sent Events (SSE) and WebSockets onto your templates without exhausting PHP-FPM pools globally. 🛠 How it looks in your code You simply create a PHP component class, define some public properties, and write an endpoint action: <?php namespace Htmx\Component; use Totoglu\Htmx\Component; class ClickCounter extends Component { public int $count = 0; public function increase() { $this->count++; } } Then, you can render it anywhere in your site with a single line: /** @var Htmx $htmx */ echo $htmx->renderComponent(ClickCounter::class); View the documentation and examples on Github Feel free to try it out, run the tests included in the repo, and let me know your thoughts or feedback! htmx.mp4
    1 point
  10. I actually played around and got Claude to build an DB abstraction layer for PW that would allow using Postgres etc. Seems like there is definitely potential on this front.
    1 point
  11. I think there is only one thing missing: a screenshot 😉
    1 point
  12. Now when they're all pinged, we need to have something for them... Something to do or to write about... Maybe just say hello and share where they're at now...
    1 point
  13. @tpr @Martijn Geerts @renobird @cstevensjr @Wanze @pwired @Mike Rockett @Zeka @SiNNuT @DaveP @justb3a @nik @MadeMyDay and so many others...
    1 point
  14. Let's see if we can also get these guys to stop by here more often @apeisa @Joss @Nico Knoll @Gazley @WillyC @LostKobrakai @owzim the geerts brothers and who else am I forgetting?
    1 point
  15. I never use AI to generate code, my case was more about understanding an issue and how the framework works. The kind of issue that is hard to find a solution with a Google search. The fun fact is that this issue never existed, that was a misinterpretation by myself, but all chatbot (ChatGPT, Claude and the framework dedicated chatbot) said this was a "very common issue", and gave me very bad solutions, all bullshit. 😂
    1 point
  16. @Soma a massive welcome back. I followed you on Twitter and absolutely loved your art journey but then it just seemed to disappear. As I hate social media I am not really on anything else, and certainly don't use X anymore. I always wondered what happened to a forum legend. As somebody mentioned earlier, you probably don't realise how much your posts have and still do help people.
    1 point
×
×
  • Create New...