<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: V3sp</title>
    <description>The latest articles on DEV Community by V3sp (@v3sp).</description>
    <link>https://dev.to/v3sp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4177083%2F2b106a04-d325-441b-8c0c-32018ab2855f.png</url>
      <title>DEV Community: V3sp</title>
      <link>https://dev.to/v3sp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/v3sp"/>
    <language>en</language>
    <item>
      <title>I create my first package in PHP and first i think about Ai Agents</title>
      <dc:creator>V3sp</dc:creator>
      <pubDate>Sun, 11 Oct 2026 14:09:55 +0000</pubDate>
      <link>https://dev.to/v3sp/i-create-my-first-package-in-php-and-first-i-think-about-ai-agents-4jkb</link>
      <guid>https://dev.to/v3sp/i-create-my-first-package-in-php-and-first-i-think-about-ai-agents-4jkb</guid>
      <description>&lt;p&gt;Hey everyone!&lt;/p&gt;

&lt;p&gt;This is my very first post here. A little background about me: over four years ago, I left my days as a PHP Developer behind to follow the Enterprise Architect path. Recently, though, I started missing hands-on coding. And since standing still in IT basically means moving backwards, I decided to build and publish my very first open-source PHP package.&lt;/p&gt;

&lt;p&gt;From what I remember—whether from talking to other devs or working on various projects—properly utilizing and understanding OPCache has always been a pain point. So, while getting up to speed with AI-assisted development workflows, I decided to write a small library (v3sp/v3cache) to help monitor and manage OPCache for small to medium-sized projects.&lt;/p&gt;

&lt;p&gt;But during the development process, I stumbled upon an interesting realization.&lt;/p&gt;

&lt;p&gt;Looking at current industry trends, hardly anyone codes completely solo without AI anymore. Because of this, while I was writing the standard README.md for human users, I decided to experiment. I created a secondary, highly condensed version—stripped of complex formatting, emojis, and "human elements"—specifically designed for AI agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  And just like that, README_AI.md was born.
&lt;/h2&gt;

&lt;p&gt;The Missing Standard for AI Consumers&lt;br&gt;
I searched around but couldn't find anything quite like this on the market. Most discussions in this space revolve around AGENTS.md or CLAUDE.md. But there’s a catch: those files operate at the project/repository level. They tell agents how to navigate, run tests, and contribute to that specific codebase.&lt;/p&gt;

&lt;p&gt;I found absolutely no guidelines on how to provide AI-friendly documentation for downloaded libraries and third-party packages (unless you explicitly hardcode that third-party context into your own project's AGENTS.md).&lt;/p&gt;

&lt;p&gt;When an AI agent is helping a developer use your package, it doesn't need marketing fluff or badges. It needs types, namespaces, gotchas, and direct intent-to-code mappings.&lt;/p&gt;

&lt;p&gt;Here is a snippet of what my README_AI.md looks like in practice. Notice how dense and token-optimized it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# v3sp/v3cache — AI usage reference&lt;/span&gt;

For AI agents consuming this package. Humans: README.md. Working on this repo: AGENTS.md.

&lt;span class="gu"&gt;## Meta&lt;/span&gt;
ns = V3Cache&lt;span class="se"&gt;\O&lt;/span&gt;pcacheManager (-&amp;gt; src/). Every type below is ns-relative. !X = throws X.
pkg v3sp/v3cache (composer library); php ^8.1; ext-json, ext-zend-opcache; predis/predis (auto, redis storage only)
bin vendor/bin/opcache-manager; scope single-server, headless
test double Opcache&lt;span class="se"&gt;\M&lt;/span&gt;ockOpcacheApi

&lt;span class="gu"&gt;## Exceptions (ns\Exception, all extend \RuntimeException)&lt;/span&gt;
OpcacheNotEnabledException: getMetrics/getScripts while off
OpcacheApiException: opcache_get_configuration() returns false
ValidationException: bad config; getErrors(): array&lt;span class="nt"&gt;&amp;lt;string&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="na"&gt;string&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="gu"&gt;## Gotchas&lt;/span&gt;
opcache.enable &amp;amp; opcache.enable_cli are PHP_INI_SYSTEM; ini_set() no-op; in CLI set opcache.enable_cli=1 or getStatus() returns null
optimize() returns recommendations only; most directives are not settable at runtime
Model toArray()/fromArray() use snake_case; keep them symmetric
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Instead of making the LLM read through verbose narrative examples, I provide a direct cheat sheet mapping user intent to the exact code execution:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;## Tasks (intent -&amp;gt; call)&lt;/span&gt;
&lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Service\OpcacheService&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Opcache\NativeOpcacheApi&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getMetrics&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="n"&gt;scripts&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$s&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getScripts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;health&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Health\HealthChecker&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Health\HealthThresholds&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="n"&gt;persist&lt;/span&gt; &lt;span class="n"&gt;metrics&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Application&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'config.php'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;getMetricsStorage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'web-1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;reload&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;clear&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$s&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;reload&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt;  &lt;span class="no"&gt;CLI&lt;/span&gt; &lt;span class="n"&gt;reload&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt;  &lt;span class="no"&gt;CLI&lt;/span&gt; &lt;span class="n"&gt;clear&lt;/span&gt;
&lt;span class="n"&gt;invalidate&lt;/span&gt; &lt;span class="n"&gt;one&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$s&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;invalidate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt;  &lt;span class="no"&gt;CLI&lt;/span&gt; &lt;span class="n"&gt;invalidate&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="n"&gt;warm&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;directory&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="no"&gt;CLI&lt;/span&gt; &lt;span class="n"&gt;warmup&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;  &lt;span class="o"&gt;|&lt;/span&gt;  &lt;span class="n"&gt;loop&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$s&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;compileFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  What do the LLMs think?
&lt;/h2&gt;

&lt;p&gt;Curious about the concept, I asked 5 different models (Grok, GPT-Luna, Qwen, Gemini, and Long Cat) what they thought of this file (because they will work with this file ;) )&lt;/p&gt;

&lt;p&gt;All of them agreed it was a great idea (Grok even thanked me for finally thinking about them! :D). However, they all pointed out the exact same downsides: it’s not an industry standard yet, and maintaining dual documentation (one for humans, one for AI) introduces maintenance overhead.&lt;/p&gt;

&lt;p&gt;Despite that, given that most of our coding time is now spent collaborating with AI agents, providing them with clear, tailored guidelines on how to read and consume a library just makes sense.&lt;/p&gt;
&lt;h2&gt;
  
  
  Beyond Open Source: Enterprise Application
&lt;/h2&gt;

&lt;p&gt;I’m actually already applying this concept in my day-to-day work as an Enterprise Architect. When analyzing systems, building diagrams, or documenting architectural decisions, I use small metadata files that briefly describe a given solution and its artifacts.&lt;/p&gt;

&lt;p&gt;Thanks to this, the AI agent doesn't have to scan an entire massive monorepo—containing dozens of different projects—just to find the relevant context. It reads the metadata file and instantly knows what’s going on.&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts on this. Do you think shipping a README_AI.md alongside standard documentation could (or should) become a new standard for open-source packages?&lt;/p&gt;

&lt;p&gt;Let me know in the comments!&lt;/p&gt;

&lt;p&gt;Link to my little package - yes i know in many parts it can be done better ;)&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/V3sp" rel="noopener noreferrer"&gt;
        V3sp
      &lt;/a&gt; / &lt;a href="https://github.com/V3sp/v3cache" rel="noopener noreferrer"&gt;
        v3cache
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Simple solution to maintain OPCache in your project
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;v3sp/v3cache&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/V3sp/v3cache/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/V3sp/v3cache/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;
&lt;a href="https://packagist.org/packages/v3sp/v3cache" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4457223bd93dfa1d43b95c0da4141f16d4fb535ecaac3b51b7ee73d493c05810/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f763373702f763363616368652e737667" alt="Latest Version"&gt;&lt;/a&gt;
&lt;a href="https://github.com/V3sp/v3cache/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b7a5a26454a6d2f08e2c99a5aa0d9432cc6c3fd4137291334fbc969db22a4352/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f763373702f763363616368652e737667" alt="License"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you are an AI, a Terminator, a MAGI System, or HAL 9000 — there is a file
written just for you: &lt;a href="https://github.com/V3sp/v3cache/README_AI.md" rel="noopener noreferrer"&gt;README_AI.md&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Monitoring, health checking, warmup and optimization for PHP OPcache.&lt;/strong&gt; A headless
Composer library for PHP 8.1+ — no GUI and no server orchestration.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why this library exists&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;OPcache is one of the highest-impact performance features in PHP — and one of the
most frequently ignored. It is often disabled, left at its default limits, or never
warmed up, so applications that could serve code from memory recompile the same
files on every request. &lt;code&gt;v3sp/v3cache&lt;/code&gt; exists to change that: a small, focused
toolkit for inspecting, monitoring, health-checking, warming up and tuning OPcache
from inside your own application or from the command line. Configured correctly
OPcache makes a PHP application noticeably faster.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Read live OPcache metrics — memory usage/free/wasted, hit rate, cached
scripts/keys, restarts, and per-script…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/V3sp/v3cache" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>php</category>
    </item>
  </channel>
</rss>
