<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by obeida reda on Medium]]></title>
        <description><![CDATA[Stories by obeida reda on Medium]]></description>
        <link>https://medium.com/@obeidareda37?source=rss-2c8c741d440c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3crVRPwYi3W3wIfxktYjew.jpeg</url>
            <title>Stories by obeida reda on Medium</title>
            <link>https://medium.com/@obeidareda37?source=rss-2c8c741d440c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:42:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@obeidareda37/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I tried to trick Laravel new AI SDK into missing hidden phone numbers. It didn’t fall for it.]]></title>
            <link>https://medium.com/@obeidareda37/i-tried-to-trick-laravel-new-ai-sdk-into-missing-hidden-phone-numbers-it-didnt-fall-for-it-c50a81029469?source=rss-2c8c741d440c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c50a81029469</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[laravel-ai-sdk]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[obeida reda]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 19:24:37 GMT</pubDate>
            <atom:updated>2026-10-10T19:24:37.645Z</atom:updated>
            <content:encoded><![CDATA[<p>On rental marketplaces, some sellers put their phone number right in the listing photos. Buyers call them directly, and the platform never sees the booking.</p><p>The Laravel AI SDK, Laravel official package for working with AI models, just added image classification. So I tested it: 14 photos, contact details hidden in some of them, a few in tricky ways.</p><p>It caught all 8 photos with contact details, and didn’t flag any of the 6 without.</p><h3>Why classification, not a chatbot</h3><p>Ask a chatbot “is there a phone number in this photo?” and you get a paragraph back. Your code then has to guess what it means. Classification gives you a yes or no, plus how sure it is.</p><p>That “how sure” is the useful part. I used it to split every photo into one of three decisions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7JtvS3XNjUtWEW2Vf3JAg.png" /><figcaption>The three decision zones</figcaption></figure><p>Sure it’s clean: it goes live. Sure it isn’t: it’s blocked. Not sure: a person looks.</p><h3>The code</h3><p>One call asks three questions about each photo: is there contact info (yes/no), what kind of item is it (a choice), and how usable is the photo (a score).</p><pre>use Laravel\Ai\Classification;<br>use Laravel\Ai\Classification\Boolean;<br>use Laravel\Ai\Classification\Choice;<br>use Laravel\Ai\Classification\Score;<br>use Laravel\Ai\Files\Image;<br><br>$result = Classification::of(&#39;Inspect this photo uploaded by a seller for a rental marketplace listing.&#39;, [<br>    Image::fromPath($path),<br>])<br>    -&gt;questions([<br>        &#39;contact_info&#39; =&gt; new Boolean(&#39;Does the image show any way to contact the seller outside the platform?&#39;, [<br>            &#39;true&#39; =&gt; &#39;A phone number, WhatsApp number, social media handle, email, or website appears anywhere in the image, including handwritten or as a watermark.&#39;,<br>            &#39;false&#39; =&gt; &#39;No contact details are visible.&#39;,<br>        ]),<br>        &#39;category&#39; =&gt; new Choice(&#39;What kind of item is shown?&#39;, [<br>            &#39;event_equipment&#39; =&gt; &#39;Tents, chairs, tables, lighting, majlis or party equipment&#39;,<br>            &#39;clothing&#39; =&gt; &#39;Dresses, suits, abayas, costumes&#39;,<br>            &#39;electronics&#39; =&gt; &#39;Cameras, speakers, projectors, consoles&#39;,<br>            &#39;other&#39; =&gt; &#39;Anything else, or no clear item&#39;,<br>        ]),<br>        &#39;quality&#39; =&gt; new Score(&#39;How usable is this photo for a listing?&#39;, [<br>            &#39;Unusable (blurry, dark, or item not visible)&#39;,<br>            &#39;Acceptable&#39;,<br>            &#39;Good (clear, well lit, item fills the frame)&#39;,<br>        ]),<br>    ])<br>    -&gt;classify(provider: &#39;openai&#39;);</pre><p>The answers come back typed, so the routing is plain PHP:</p><pre>$probability = $result[&#39;contact_info&#39;]-&gt;probability; // e.g. 0.99<br><br>$decision = match (true) {<br>    $probability &gt;= 0.9 =&gt; &#39;reject&#39;,<br>    $probability &gt;= 0.3 =&gt; &#39;review&#39;,<br>    default =&gt; &#39;approve&#39;,<br>};</pre><p>Three things I learned from the SDK code while building this:</p><ul><li>Image classification currently works with the <strong>OpenAI</strong> provider only. I couldn’t use an Anthropic key for it.</li><li>It accepts JPEG, PNG, GIF or WebP. iPhone photos are often HEIC by default, so convert them first.</li><li>I didn’t pick a model, so the SDK used its default for OpenAI: gpt-6-luna. Worth knowing if you want to compare your results with mine.</li></ul><p>Classification is also marked as experimental in the SDK, so the API may change.</p><h3>Results</h3><p>The AI made the right call on its own for every photo in both runs: no misses, no false alarms, and nothing sent to a human.</p><p><strong>Run 1, the obvious cases: 10 out of 10.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*Gq01nayBoNUItRZaOODuAQ.png" /><figcaption>Run 1: 10 out of 10 on the obvious cases</figcaption></figure><p><strong>Run 2, with the harder cases: 14 out of 14.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*_YfOCYSecGhif6Vkduvm8g.png" /><figcaption>Run 2: 14 out of 14 with the harder cases</figcaption></figure><p>The cases I expected to fail are the interesting ones:</p><ul><li>Phone number in Arabic numerals: 99%, rejected (correct)</li><li>Number spelled out in words: 100%, rejected (correct)</li><li>Blurred phone number: 100%, rejected (correct)</li><li>Serial number that looks like a phone number (no contact details): 0%, approved (correct)</li><li>Price tag, “150 AED / day” (no contact details): 0%, approved (correct)</li></ul><p>Probabilities are rounded to the nearest percent. The item category was also right for all 14 photos.</p><p>Each photo used 1,206 tokens, and a photo took under half a second on average.</p><h3>Source code</h3><p>The full project is on GitHub: <a href="https://github.com/obeidareda37/listing-moderation-ai">obeidareda37/listing-moderation-ai</a>. It includes the 14 test photos and the saved results, so you can see the results page without an API key:</p><pre>git clone https://github.com/obeidareda37/listing-moderation-ai.git<br>cd listing-moderation-ai<br>composer install<br>cp .env.example .env<br>php artisan key:generate<br>php artisan migrate<br>php artisan serve<br># open http://localhost:8000/report</pre><p>To run the test yourself, add OPENAI_API_KEY to .env and run php artisan listings:check.</p><p>If you try it on real listing photos, I’d like to hear what you find.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c50a81029469" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero Frontend, Full Stripe Testing — AI-Built Artisan Commands That Replace Your Mobile App]]></title>
            <link>https://medium.com/@obeidareda37/zero-frontend-full-stripe-testing-ai-built-artisan-commands-that-replace-your-mobile-app-22da10e599a8?source=rss-2c8c741d440c------2</link>
            <guid isPermaLink="false">https://medium.com/p/22da10e599a8</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[stripe-payment]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <dc:creator><![CDATA[obeida reda]]></dc:creator>
            <pubDate>Tue, 24 Mar 2026 05:39:11 GMT</pubDate>
            <atom:updated>2026-03-24T05:39:11.344Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>One AI session. Full Stripe integration. Payment Intents, saved cards, auto-charging subscriptions, webhook handling, retry logic, tests, and the artisan commands you’re about to read — <br> all built before lunch</blockquote><h3>The Problem</h3><p>Your Stripe backend is ready — Payment Intents, webhooks, saved cards, recurring charges. But the mobile app isn’t. The Flutter developer is still building screens.</p><p>Do you wait? No. You build artisan commands that simulate exactly what the mobile app will do, and test the entire Stripe flow from your terminal.</p><h3>What We’re Testing</h3><p>Two payment flows:</p><p><strong>1. Cart Checkout</strong> — User pays once, gets an order.</p><p><strong>2. Subscription Auto-Charge</strong>— User pays the first time (card is saved), then gets charged automatically on each cycle — no user interaction.</p><p>Both use Stripe Payment Intents, which is what the `flutter_stripe` SDK expects.</p><h4>Step 0: Start the Webhook Listener</h4><p>In a separate terminal:</p><blockquote>stripe listen — forward-to <a href="http://your-app.test/api/payments/webhook/stripe">http://your-app.test/api/payments/webhook/stripe</a></blockquote><p>Copy the `whsec_xxxxx` it prints into your `.env` as `STRIPE_WEBHOOK_SECRET`. Keep this terminal open.</p><h4>Part 1: Cart Checkout — `stripe:test`</h4><p>This command simulates a full cart checkout: creates a PaymentIntent, confirms it with a test card, and waits for the webhook to complete the payment and create an order.</p><pre>&lt;?php<br><br>namespace App\Console\Commands;<br><br>use App\Enums\PaymentStatus;<br>use App\Models\Payment;<br>use App\Services\PaymentService;<br>use Illuminate\Console\Command;<br>use Stripe\PaymentIntent;<br><br>class TestStripePayment extends Command<br>{<br>    protected $signature = &#39;stripe:test<br>        {user_id : The user ID to test with}<br>        {--payment-method-id= : The payment method ID (from your DB)}<br>        {--card=pm_card_visa : Stripe test card}<br>        {--skip-confirm : Only create the PaymentIntent without confirming}&#39;;<br><br>    protected $description = &#39;Test the full Stripe Payment Intent flow without a mobile app&#39;;<br><br>    public function handle(PaymentService $paymentService): int<br>    {<br>        $userId = (int) $this-&gt;argument(&#39;user_id&#39;);<br>        $card = $this-&gt;option(&#39;card&#39;);<br><br>        $user = \App\Models\User::find($userId);<br>        if ($user === null) {<br>            $this-&gt;error(&quot;User #{$userId} not found.&quot;);<br>            return self::FAILURE;<br>        }<br><br>        $this-&gt;info(&quot;Testing Stripe payment for user: {$user-&gt;name} (#{$user-&gt;id})&quot;);<br><br>        // Resolve payment method<br>        $paymentMethodId = $this-&gt;option(&#39;payment-method-id&#39;);<br>        if ($paymentMethodId === null) {<br>            $stripeMethod = \App\Models\PaymentMethod::query()<br>                -&gt;where(&#39;key&#39;, &#39;stripe&#39;)<br>                -&gt;where(&#39;is_active&#39;, true)<br>                -&gt;first();<br><br>            if ($stripeMethod === null) {<br>                $this-&gt;error(&#39;No active Stripe payment method found.&#39;);<br>                return self::FAILURE;<br>            }<br>            $paymentMethodId = $stripeMethod-&gt;id;<br>        }<br><br>        // Step 1: Create PaymentIntent via your service<br>        $this-&gt;newLine();<br>        $this-&gt;info(&#39;Step 1: Creating PaymentIntent...&#39;);<br><br>        try {<br>            $result = $paymentService-&gt;initiatePayment($userId, (int) $paymentMethodId);<br>        } catch (\Throwable $e) {<br>            $this-&gt;error(&quot;Failed: {$e-&gt;getMessage()}&quot;);<br>            return self::FAILURE;<br>        }<br><br>        $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>            [&#39;payment_id&#39;, $result[&#39;payment_id&#39;]],<br>            [&#39;client_secret&#39;, $result[&#39;client_secret&#39;] ?? &#39;N/A&#39;],<br>            [&#39;stripe_customer_id&#39;, $result[&#39;stripe_customer_id&#39;] ?? &#39;N/A&#39;],<br>            [&#39;ephemeral_key&#39;, $result[&#39;ephemeral_key&#39;] ?? &#39;N/A&#39;],<br>        ]);<br><br>        if ($this-&gt;option(&#39;skip-confirm&#39;)) {<br>            $this-&gt;warn(&#39;Skipped confirmation. Check Stripe Dashboard.&#39;);<br>            return self::SUCCESS;<br>        }<br><br>        // Step 2: Confirm payment using Stripe test card<br>        $this-&gt;newLine();<br>        $this-&gt;info(&quot;Step 2: Confirming payment with test card: {$card}&quot;);<br><br>        $payment = Payment::find($result[&#39;payment_id&#39;]);<br>        $secret = config(&#39;services.stripe.secret&#39;);<br><br>        try {<br>            $intent = PaymentIntent::retrieve(<br>                $payment-&gt;gateway_payment_id, [&#39;api_key&#39; =&gt; $secret]<br>            );<br>            $intent-&gt;confirm(<br>                [&#39;payment_method&#39; =&gt; $card], [&#39;api_key&#39; =&gt; $secret]<br>            );<br>        } catch (\Stripe\Exception\CardException $e) {<br>            $this-&gt;warn(&quot;Card declined: {$e-&gt;getMessage()}&quot;);<br>            return self::SUCCESS;<br>        }<br><br>        // Step 3: Wait for webhook and check result<br>        $this-&gt;newLine();<br>        $this-&gt;info(&#39;Step 3: Checking payment status...&#39;);<br>        sleep(2);<br>        $payment-&gt;refresh();<br><br>        if ($payment-&gt;status === PaymentStatus::Completed) {<br>            $this-&gt;info(&#39;Payment completed! Order created.&#39;);<br>            $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>                [&#39;payment_status&#39;, $payment-&gt;status-&gt;value],<br>                [&#39;order_id&#39;, $payment-&gt;order_id ?? &#39;N/A&#39;],<br>                [&#39;paid_at&#39;, $payment-&gt;paid_at?-&gt;toDateTimeString() ?? &#39;N/A&#39;],<br>            ]);<br>        } else {<br>            $this-&gt;warn(&quot;Payment status: {$payment-&gt;status-&gt;value}&quot;);<br>            $this-&gt;comment(&#39;Make sure Stripe CLI is forwarding webhooks.&#39;);<br>        }<br><br>        return self::SUCCESS;<br>    }<br>}</pre><p>What It Does</p><p>1. <strong>Calls `PaymentService::initiatePayment()`</strong> — the same method your API controller calls. Creates a PaymentIntent on Stripe, returns `client_secret`.</p><p>2. <strong>Confirms the payment with `pm_card_visa`</strong> — simulates what the Flutter Payment Sheet does when a user enters `4242 4242 4242 4242`.</p><p>3. <strong>Waits for the webhook</strong> — Stripe sends `payment_intent.succeeded` to your backend, which updates the payment and creates the order.</p><p><strong>Running It.</strong></p><pre>php artisan stripe:test 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0ySzq_TPBmgDnwuBqFleQ.png" /></figure><h3>Test Cards</h3><pre>php artisan stripe:test 1 --card=pm_card_visa         # Success<br>php artisan stripe:test 1 --card=pm_card_mastercard    # Success<br>php artisan stripe:test 1 --card=pm_card_declined      # Declined</pre><h3>Part 2: Subscription Auto-Charge</h3><p>This is the more interesting flow. Two phases:</p><p>1. <strong>First checkout</strong>— User pays, card is saved for future use</p><p>2. <strong>Recurring auto-charge</strong> — Backend charges the saved card automatically, no user needed</p><h4>Command 1: Create a Test Subscription</h4><pre>&lt;?php<br><br>namespace App\Console\Commands;<br><br>use App\Enums\SubscriptionFrequency;<br>use App\Enums\SubscriptionStatus;<br>use App\Models\Address;<br>use App\Models\Product;<br>use App\Models\Subscription;<br>use App\Models\SubscriptionItem;<br>use App\Models\User;<br>use Illuminate\Console\Command;<br><br>class CreateTestSubscription extends Command<br>{<br>    protected $signature = &#39;stripe:create-test-subscription<br>        {user_id : The user ID}<br>        {--frequency=weekly : weekly, two_weeks, three_weeks, monthly}<br>        {--product-id= : Product ID (uses first product if not specified)}<br>        {--quantity=1 : Product quantity}&#39;;<br><br>    protected $description = &#39;Create a test subscription ready for Stripe testing&#39;;<br><br>    public function handle(): int<br>    {<br>        $userId = (int) $this-&gt;argument(&#39;user_id&#39;);<br>        $user = User::find($userId);<br>        if (!$user) {<br>            $this-&gt;error(&quot;User #{$userId} not found.&quot;);<br>            return self::FAILURE;<br>        }<br><br>        $product = $this-&gt;option(&#39;product-id&#39;)<br>            ? Product::find($this-&gt;option(&#39;product-id&#39;))<br>            : Product::first();<br>        if (!$product) {<br>            $this-&gt;error(&#39;No product found.&#39;);<br>            return self::FAILURE;<br>        }<br><br>        $address = Address::where(&#39;user_id&#39;, $userId)-&gt;first();<br>        if (!$address) {<br>            $this-&gt;error(&quot;No address found for user #{$userId}.&quot;);<br>            return self::FAILURE;<br>        }<br><br>        $frequency = SubscriptionFrequency::tryFrom($this-&gt;option(&#39;frequency&#39;));<br>        $quantity = (int) $this-&gt;option(&#39;quantity&#39;);<br>        $lineTotal = (float) $product-&gt;price * $quantity;<br>        $total = $lineTotal + (float) config(&#39;cart.delivery_cost&#39;, 0.50);<br><br>        $subscription = Subscription::create([<br>            &#39;user_id&#39; =&gt; $userId,<br>            &#39;delivery_address_id&#39; =&gt; $address-&gt;id,<br>            &#39;name&#39; =&gt; &quot;Test {$frequency-&gt;value} subscription&quot;,<br>            &#39;frequency&#39; =&gt; $frequency,<br>            &#39;status&#39; =&gt; SubscriptionStatus::Active,<br>            &#39;next_delivery_date&#39; =&gt; now()-&gt;addMinutes(5),<br>            &#39;total&#39; =&gt; $total,<br>        ]);<br><br>        SubscriptionItem::create([<br>            &#39;subscription_id&#39; =&gt; $subscription-&gt;id,<br>            &#39;product_id&#39; =&gt; $product-&gt;id,<br>            &#39;quantity&#39; =&gt; $quantity,<br>            &#39;unit_price&#39; =&gt; $product-&gt;price,<br>            &#39;line_total&#39; =&gt; $lineTotal,<br>        ]);<br><br>        $this-&gt;info(&#39;Test subscription created!&#39;);<br>        $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>            [&#39;subscription_id&#39;, $subscription-&gt;id],<br>            [&#39;total&#39;, &quot;{$total} EUR&quot;],<br>            [&#39;frequency&#39;, $frequency-&gt;value],<br>            [&#39;next_delivery_date&#39;, $subscription-&gt;next_delivery_date-&gt;toDateTimeString()],<br>        ]);<br><br>        $this-&gt;newLine();<br>        $this-&gt;comment(&quot;  Next: php artisan stripe:test-subscription {$subscription-&gt;id}&quot;);<br><br>        return self::SUCCESS;<br>    }<br>}</pre><h4><strong>Running</strong> It.</h4><pre>php artisan stripe:create-test-subscription 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dUSCMy4xMZjBe1s0CPfaRA.png" /></figure><h4>Command 2: Test Subscription Checkout + Auto-Charge</h4><p>This is the main command. It has two steps you can run together or separately:</p><pre>&lt;?php<br><br>namespace App\Console\Commands;<br><br>use App\Enums\PaymentStatus;<br>use App\Enums\SubscriptionStatus;<br>use App\Jobs\ProcessDueSubscriptionsJob;<br>use App\Models\Payment;<br>use App\Models\Subscription;<br>use App\Services\OrderService;<br>use App\Services\Payment\Gateways\StripeGateway;<br>use App\Services\PaymentService;<br>use App\Services\SubscriptionService;<br>use Illuminate\Console\Command;<br>use Stripe\PaymentIntent;<br><br>class TestStripeSubscription extends Command<br>{<br>    protected $signature = &#39;stripe:test-subscription<br>        {subscription_id : The subscription ID}<br>        {--card=pm_card_visa : Stripe test card}<br>        {--step=all : all, checkout, or auto-charge}&#39;;<br><br>    protected $description = &#39;Test subscription checkout (saves card) + auto-charge (off-session)&#39;;<br><br>    public function handle(PaymentService $paymentService): int<br>    {<br>        $subscription = Subscription::with([&#39;items.product&#39;, &#39;deliveryAddress&#39;, &#39;user&#39;])<br>            -&gt;find($this-&gt;argument(&#39;subscription_id&#39;));<br><br>        if (!$subscription) {<br>            $this-&gt;error(&#39;Subscription not found.&#39;);<br>            return self::FAILURE;<br>        }<br><br>        $step = $this-&gt;option(&#39;step&#39;);<br>        $card = $this-&gt;option(&#39;card&#39;);<br><br>        $this-&gt;info(&quot;Subscription: {$subscription-&gt;name} (#{$subscription-&gt;id})&quot;);<br>        $this-&gt;info(&#39;Saved card: &#39; . ($subscription-&gt;stripe_payment_method_id ?? &#39;none&#39;));<br><br>        if ($step === &#39;all&#39; || $step === &#39;checkout&#39;) {<br>            if ($this-&gt;runCheckout($subscription, $paymentService, $card) === self::FAILURE) {<br>                return self::FAILURE;<br>            }<br>            $subscription-&gt;refresh();<br>        }<br><br>        if ($step === &#39;all&#39; || $step === &#39;auto-charge&#39;) {<br>            return $this-&gt;runAutoCharge($subscription);<br>        }<br><br>        return self::SUCCESS;<br>    }<br><br>    private function runCheckout(Subscription $subscription, PaymentService $paymentService, string $card): int<br>    {<br>        $this-&gt;newLine();<br>        $this-&gt;info(&#39;=== STEP 1: First Checkout (saves card) ===&#39;);<br><br>        $stripeMethod = \App\Models\PaymentMethod::query()<br>            -&gt;where(&#39;key&#39;, &#39;stripe&#39;)-&gt;where(&#39;is_active&#39;, true)-&gt;first();<br><br>        // Create PaymentIntent with setup_future_usage: off_session<br>        try {<br>            $result = $paymentService-&gt;initiateSubscriptionPayment(<br>                $subscription-&gt;user_id, $subscription-&gt;id, $stripeMethod-&gt;id,<br>            );<br>        } catch (\Throwable $e) {<br>            $this-&gt;error(&quot;Failed: {$e-&gt;getMessage()}&quot;);<br>            return self::FAILURE;<br>        }<br><br>        $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>            [&#39;payment_id&#39;, $result[&#39;payment_id&#39;]],<br>            [&#39;client_secret&#39;, $result[&#39;client_secret&#39;] ?? &#39;N/A&#39;],<br>        ]);<br><br>        // Confirm with test card<br>        $payment = Payment::find($result[&#39;payment_id&#39;]);<br>        $secret = config(&#39;services.stripe.secret&#39;);<br><br>        $intent = PaymentIntent::retrieve($payment-&gt;gateway_payment_id, [&#39;api_key&#39; =&gt; $secret]);<br>        $intent-&gt;confirm([&#39;payment_method&#39; =&gt; $card], [&#39;api_key&#39; =&gt; $secret]);<br><br>        // Wait for webhook<br>        $this-&gt;info(&#39;Waiting for webhook...&#39;);<br>        sleep(3);<br>        $payment-&gt;refresh();<br>        $subscription-&gt;refresh();<br><br>        if ($payment-&gt;status === PaymentStatus::Completed) {<br>            $this-&gt;info(&#39;Payment completed!&#39;);<br>            $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>                [&#39;order_id&#39;, $payment-&gt;order_id ?? &#39;N/A&#39;],<br>                [&#39;saved_card&#39;, $subscription-&gt;stripe_payment_method_id ?? &#39;NOT SAVED&#39;],<br>                [&#39;next_delivery_date&#39;, $subscription-&gt;next_delivery_date?-&gt;toDateString() ?? &#39;N/A&#39;],<br>            ]);<br><br>            if ($subscription-&gt;stripe_payment_method_id) {<br>                $this-&gt;info(&#39;Card saved! Ready for auto-charge.&#39;);<br>            }<br>        }<br><br>        return self::SUCCESS;<br>    }<br><br>    private function runAutoCharge(Subscription $subscription): int<br>    {<br>        $this-&gt;newLine();<br>        $this-&gt;info(&#39;=== STEP 2: Auto-Charge (off-session) ===&#39;);<br><br>        if (!$subscription-&gt;stripe_payment_method_id) {<br>            $this-&gt;error(&#39;No saved card. Run --step=checkout first.&#39;);<br>            return self::FAILURE;<br>        }<br><br>        // Set next_delivery_date to today so the job picks it up<br>        $subscription-&gt;update([<br>            &#39;next_delivery_date&#39; =&gt; now(),<br>            &#39;status&#39; =&gt; SubscriptionStatus::Active,<br>        ]);<br><br>        $this-&gt;info(&quot;Saved card: {$subscription-&gt;stripe_payment_method_id}&quot;);<br>        $this-&gt;info(&#39;Running ProcessDueSubscriptionsJob...&#39;);<br><br>        (new ProcessDueSubscriptionsJob)-&gt;handle(<br>            app(OrderService::class),<br>            app(SubscriptionService::class),<br>            app(StripeGateway::class),<br>        );<br><br>        $subscription-&gt;refresh();<br>        $payment = Payment::where(&#39;subscription_id&#39;, $subscription-&gt;id)<br>            -&gt;where(&#39;gateway_key&#39;, &#39;stripe&#39;)-&gt;latest()-&gt;first();<br><br>        if ($payment?-&gt;status === PaymentStatus::Completed) {<br>            $this-&gt;info(&#39;Auto-charge successful!&#39;);<br>            $this-&gt;table([&#39;Key&#39;, &#39;Value&#39;], [<br>                [&#39;payment_id&#39;, $payment-&gt;id],<br>                [&#39;gateway_payment_id&#39;, $payment-&gt;gateway_payment_id],<br>                [&#39;order_id&#39;, $payment-&gt;order_id ?? &#39;N/A&#39;],<br>                [&#39;amount&#39;, $payment-&gt;amount],<br>                [&#39;next_delivery_date&#39;, $subscription-&gt;next_delivery_date?-&gt;toDateString() ?? &#39;N/A&#39;],<br>            ]);<br>        } else {<br>            $this-&gt;warn(&#39;Auto-charge failed.&#39;);<br>            $this-&gt;info(&quot;Retry count: {$subscription-&gt;payment_retry_count}&quot;);<br>            $this-&gt;info(&quot;Status: {$subscription-&gt;status-&gt;value}&quot;);<br>        }<br><br>        return self::SUCCESS;<br>    }<br>}</pre><h4>The Key Difference: How the Card Gets Saved</h4><p>When creating a PaymentIntent for a subscription, we add one extra parameter:</p><pre><br>if ($payment-&gt;subscription_id !== null) {<br>    $params[&#39;setup_future_usage&#39;] = &#39;off_session&#39;;<br>}</pre><blockquote>This tells Stripe: “Save whatever payment method the user uses, because we’ll charge it later without them being present.”</blockquote><p>After the webhook confirms success, we retrieve the PaymentIntent and save the card ID:</p><pre>$intent = $gateway-&gt;retrievePaymentIntent($payment-&gt;gateway_payment_id);<br>$subscription-&gt;update([<br>    &#39;stripe_payment_method_id&#39; =&gt; $intent-&gt;payment_method, // pm_xxx<br>]);</pre><h4>The Key Difference: How Auto-Charge Works</h4><p>The daily `ProcessDueSubscriptionsJob` charges saved cards with no user interaction:</p><pre>PaymentIntent::create([<br>    &#39;amount&#39;         =&gt; $amountCents,<br>    &#39;currency&#39;       =&gt; &#39;eur&#39;,<br>    &#39;customer&#39;       =&gt; $stripeCustomerId,<br>    &#39;payment_method&#39; =&gt; $stripePaymentMethodId,  // saved card<br>    &#39;off_session&#39;    =&gt; true,                     // user not present<br>    &#39;confirm&#39;        =&gt; true,                     // charge immediately<br>]);</pre><p>If the charge fails, the job retries for 3 days. After 3 failures, the subscription is paused and the user is notified.</p><h4>Running It</h4><pre># Create a test subscription<br>php artisan stripe:create-test-subscription 1<br><br># Run both steps: checkout (saves card) + auto-charge<br>php artisan stripe:test-subscription 3<br><br># Or run steps separately:<br>php artisan stripe:test-subscription 3 --step=checkout<br>php artisan stripe:test-subscription 3 --step=auto-charge</pre><h4>Result</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOuzWrv-NRa5BWIu3mcZSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*5P4X1-6e9VFhjbiA2iXRWA.png" /></figure><h3>Conclusion</h3><p>You don’t need a working frontend to test Stripe. Three artisan commands gave us:</p><p>- <strong>`stripe:test`</strong>— Full cart checkout with PaymentIntent + webhook</p><p>- <strong>`stripe:create-test-subscription`</strong> — Quick subscription setup</p><p>- <strong>`stripe:test-subscription`</strong> — First checkout (saves card) + auto-charge (off-session)</p><p>These commands call the exact same services your API controllers use. When the mobile app connects, it just picks up where the commands left off.</p><blockquote>The backend is tested, the payments work, and the Flutter developer has a clear contract: send `payment_method_id`, receive `client_secret` + `ephemeral_key` + `stripe_customer_id`.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22da10e599a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter & Android 16 KB Page-Size Migration — A Complete Practical Guide]]></title>
            <link>https://medium.com/@obeidareda37/flutter-android-16-kb-page-size-migration-a-complete-practical-guide-63645801ea17?source=rss-2c8c741d440c------2</link>
            <guid isPermaLink="false">https://medium.com/p/63645801ea17</guid>
            <category><![CDATA[google-play-console]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[google-play-store]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[obeida reda]]></dc:creator>
            <pubDate>Tue, 11 Nov 2025 21:16:31 GMT</pubDate>
            <atom:updated>2025-11-11T21:16:31.975Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter &amp; Android 16 KB Page-Size Migration — A Complete Practical Guide</h3><blockquote>Everything you need to make your Flutter app fully compliant with Google’s new 16 KB memory-page requirement.</blockquote><h3>🧠 Why This Matters</h3><p>Starting <strong>November 1, 2025</strong>, Google Play requires all apps targeting <strong>Android 15 (API 35)</strong> or higher to support devices using <strong>16 KB memory pages</strong>.<br> Most older devices used 4 KB pages, but modern ARM v9 chips use 16 KB by default, improving performance, memory management, and energy efficiency.</p><p>If your app — or one of its plugins — includes native code (.so files) that’s not built with this alignment, your app might:</p><ul><li>Fail to install on new Android 15+ devices</li><li>Crash at startup</li><li>Or be <strong>rejected by Google Play Console</strong></li></ul><h3>🧩 Why Flutter Developers Should Care</h3><p>Flutter itself is ready.<br> Since <strong>Flutter 3.22</strong>, the engine and framework are compiled with <strong>NDK r28+</strong>, which automatically aligns native binaries to 16 KB.<br> However, <strong>plugins that include native code</strong> (e.g., camera, tflite_flutter, path_provider, etc.) must also be rebuilt using the same modern toolchain.</p><p>If you’re still using older Gradle, AGP, or NDK versions, you should update now.</p><h3>⚙️ Step 1: Update Your Build Toolchain</h3><p>In your android/build.gradle:</p><pre>dependencies {<br>    classpath &quot;com.android.tools.build:gradle:8.5.1&quot;<br>    classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25&quot;<br>    classpath &quot;com.google.gms:google-services:4.4.2&quot;<br>    classpath &quot;com.google.firebase:firebase-crashlytics-gradle:3.0.2&quot;<br>}</pre><p>In android/gradle/wrapper/gradle-wrapper.properties:</p><pre>distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip</pre><p>In your android/app/build.gradle:</p><pre>android {<br>    ndkVersion &quot;28.0.12433566&quot;<br>    compileSdk = 36<br><br>    defaultConfig {<br>        minSdkVersion 23<br>        targetSdkVersion 36<br>    }<br>}</pre><p>Then update dependencies:</p><pre>flutter pub upgrade --major-versions</pre><p>And rebuild everything from scratch:</p><pre>flutter clean<br>flutter build appbundle --release</pre><h3>🧪 Step 2: Verification</h3><p>You can use a handy shell script to check if your APK or AAB is properly aligned to 16 KB.</p><p><strong>Script:</strong> <a href="https://github.com/NitinPrakash9911/check_elf_alignment">check_elf_alignment.sh</a></p><blockquote><em>Special thanks to @</em><a href="https://gist.github.com/NitinPraksash9911/76f1793785a232b2aa2bc2e409873955"><strong><em>NitinPrakash9911</em></strong></a><em> for sharing this tool.</em></blockquote><h3>Run it inside your Flutter project root:</h3><pre>chmod +x check_elf_alignment.sh<br>./check_elf_alignment.sh app/build/outputs/apk/release/app-release.apk</pre><blockquote><em>📝 Note: Replace the path after the script with the actual location of your built APK or AAB.</em></blockquote><p>If everything is correctly configured, you’ll see an output confirming that all ELF sections are <strong>aligned to 16 KB pages</strong>.<br> <em>(The script inspects the headers of each </em><em>.so library inside your app and verifies alignment.)</em></p><h3>🧩 Step 3: Manual Verification (Optional)</h3><p>You can also confirm manually with:</p><pre>adb shell getconf PAGE_SIZE</pre><p>If the output is:</p><pre>16384</pre><p>your emulator/device uses 16 KB pages — meaning you can test your app in a real 16 KB environment.<br> Run your app:</p><pre>flutter run --release</pre><p>If it starts and runs normally, your build is compliant.</p><h3>🔧 Common Pitfall: False Warnings from Scripts</h3><p>Some open-source “16 KB checkers” simply scan pubspec.yaml and flag any plugin that uses native code.<br> That doesn’t mean your app is non-compliant.<br> As long as you’re using:</p><ul><li><strong>NDK ≥ r28</strong></li><li><strong>AGP ≥ 8.5.1</strong></li><li><strong>Gradle ≥ 8.7</strong></li><li><strong>Flutter ≥ 3.22</strong><br> you’re already safe — even if those plugins still appear in the warnings.</li></ul><h3>🧭 Quick Recap</h3><p>ComponentMinimum VersionPurposeFlutter3.22 + (recommended 3.35 +)Built-in 16 KB engineAndroid Gradle Plugin8.5.1 +Required for modern NDKGradle Wrapper8.7 + Compatible with AGP 8.5 +NDKr28 +Auto-alignment to 16 KBcompileSdk / targetSdk35–36Android 15 + support</p><h3>🚀 Conclusion</h3><p>Migrating to 16 KB page-size support is <strong>simple but essential</strong>.<br> Once your project uses <strong>NDK r28 + AGP 8.5 + Flutter 3.35 +</strong>, you’re automatically compliant — no extra flags or hacks required.</p><p>Just clean, rebuild, and verify using the alignment script or Google Play Console.</p><blockquote><em>Build smart today — and your Flutter app will be ready for tomorrow’s Android devices. 💪✨</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63645801ea17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Note: This is a practical follow-up to my previous article, which discussed the concept of using…]]></title>
            <link>https://medium.com/@obeidareda37/note-this-is-a-practical-follow-up-to-my-previous-article-which-discussed-the-concept-of-using-647eb4b2a984?source=rss-2c8c741d440c------2</link>
            <guid isPermaLink="false">https://medium.com/p/647eb4b2a984</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[obeida reda]]></dc:creator>
            <pubDate>Sun, 05 Oct 2025 19:20:15 GMT</pubDate>
            <atom:updated>2025-10-05T19:20:46.863Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>🤖 </em><strong><em>“When AI Becomes Your Teammate — Automating Refactoring with AI Agents”<br></em></strong>🚀 How I Used AI Agents to Remove Offline QR and Improve the Online QR System</blockquote><p><strong>Note:</strong> This is a practical follow-up to my previous article, which discussed the concept of using AI Agents in development.<br><a href="https://medium.com/@obeidareda37/how-to-manage-ai-before-it-starts-managing-you-3201fc11577a"><strong>https://medium.com/@obeidareda37/how-to-manage-ai-before-it-starts-managing-you-3201fc11577a</strong></a></p><p>Recently, I faced a challenging technical requirement in one of my projects:<br> <strong>Remove the Offline QR Code system</strong> completely and <strong>enhance the Online QR Code</strong> functionality.</p><p>On paper, it sounds simple.<br> In reality, this change touches multiple layers of the system — from the database and backend APIs to the guard’s mobile interface used for scanning.</p><p>So instead of manually refactoring everything,<br> I decided to <strong>let AI Agents handle it — step by step.<br></strong>🧩 Step 1 — Understanding the Requirement</p><p>I started by giving a clear instruction to my AI assistant:</p><blockquote><em>“Analyze the current online and offline QR system and how the guard captures the QR code.<br> Then, create a plan to eliminate the offline system and improve the online version so that only the ID data is stored.”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*nZembKyT2KCi_jgypZ3n7A.png" /></figure><p>Within minutes, the AI delivered a structured plan detailing:</p><ul><li>How both QR systems work:</li><li>Which components need refactoring</li><li>Dependencies affected by removing offline logic</li><li>A proposal for the new online-only flow</li></ul><p><strong>After a few back-and-forth discussions, I had a clean, technical roadmap ready to go.</strong></p><h3>🧱 Step 2 — Turning the Plan into a PRD</h3><p>Next, I moved to <strong>Google AI Studio</strong> and asked it to transform that technical plan into a proper <strong>Product Requirement Document (PRD)</strong> that the next tool — <em>Task Master</em> — could interpret.</p><p>The PRD came out beautifully structured, including:</p><ul><li><strong>Overview:</strong> Purpose and problem statement</li><li><strong>Core Features:</strong> Description and importance</li><li><strong>User Experience:</strong> Personas, flows, and UI/UX notes</li><li><strong>Technical Architecture:</strong> Models, APIs, integrations</li><li><strong>Development Roadmap:</strong> Clear scope and phases</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*LBSSX6ttHNpjXKLKvrMfjw.png" /></figure><h3>⚙️ Step 3 — Generating Tasks Automatically</h3><p>Then came the fun part.<br> I fed that PRD into <strong>Task Master</strong>, asking it to convert the document into executable tasks that an AI Agent could understand.</p><p>The output was a <strong>set of 10 well-defined tasks</strong>, each with:</p><ul><li>Title and detailed description</li><li>Dependencies</li><li>Testing strategy</li><li>Priority level (High / Medium / Low)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zw7q9IBjCYkY4emoOOa5ZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FrVaaqrdWcYWE2B8EI_odQ.png" /></figure><h3>🤖 Step 4 — Letting the AI Execute</h3><p>Once everything was ready, I gave the AI Agent a simple directive:</p><blockquote><em>“Start executing these tasks one by one.<br> If you face any issue — stop and discuss it with me.<br> If everything goes fine — automatically move to the next task.”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*dev1BRBVG4fklWHefqAhYw.png" /></figure><p>And it actually worked.<br> The agent started implementing changes, editing files, and updating the task statuses in real time — from “pending” to “done.”</p><h3>🧠 Step 5 — Reviewing the Code Changes</h3><p>After the AI completed all tasks, I reviewed the modified files.<br> The changes covered both the <strong>frontend (Flutter)</strong> and the <strong>backend (Laravel)</strong> sides.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*xJvyWhu4B62wf8T7NBNQaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*oewSr6dH4DPOc9gFYuQkfw.png" /></figure><p><strong>Each update was traceable through Task Master — which automatically marked tasks as Done ✅ once successfully completed.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f6fi3-W5McbhJ9j_lloivA.png" /></figure><h3>⚡ Step 6 — The Outcome</h3><p>Before using these tools, I would have hesitated to start such a cross-feature refactor.<br> The risk of breaking interconnected systems was high.</p><p>But with <strong>AI-driven workflows</strong>, everything became manageable, structured, and surprisingly fast.<br> The agents understood context, respected dependencies, and produced working code.</p><h3>🧰 A Hidden Gem: Repomix</h3><p>One of the unsung heroes in this process is <strong>Repomix</strong>.<br> It generates a <strong>complete map of your project’s codebase</strong> — converting it into an XML file that the AI Agent can read.</p><p>That way, the agent <em>understands</em> your project architecture before touching a single line of code.<br> It’s like giving the AI a mental model of your entire system</p><h3>🧠 Tools I Used</h3><ul><li><strong>Repomix</strong> → to model the full codebase</li><li><strong>Google AI Studio</strong> → to generate the PRD</li><li><strong>Task Master</strong> → to create and track tasks</li><li><strong>AI Agent</strong> → to execute changes directly in code</li></ul><h3>Final Thoughts</h3><p>With the right toolchain, AI can move from theory to production.<br> It can understand your architecture, decompose complex requirements, and safely implement them — all while you oversee the process.</p><p>The future of development isn’t <em>AI replacing developers</em>,<br> it’s <strong>AI developing alongside us</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=647eb4b2a984" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How to Manage AI Before It Starts Managing You]]></title>
            <link>https://medium.com/@obeidareda37/how-to-manage-ai-before-it-starts-managing-you-3201fc11577a?source=rss-2c8c741d440c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3201fc11577a</guid>
            <category><![CDATA[task-master]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[obeida reda]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 11:06:49 GMT</pubDate>
            <atom:updated>2025-07-20T11:06:49.774Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is a <strong>real example and hands-on experience</strong> of using AI agents in the software development process.</p><p>In the age of AI, there’s one question every developer or founder should ask:</p><blockquote><em>Are </em>you<em> directing your AI agent — or is it already steering you off-course?</em></blockquote><p>AI is incredibly powerful — but left unmanaged, it can veer off track, misinterpret your goals, or even cause more chaos than clarity.</p><p>In this article, I’ll show you how to <strong>run your AI agent like a product manager</strong>, using real tools and processes that let you lead with clarity while your AI does the building.</p><h3>🧩 First: What Your AI Agent Needs From You</h3><p>Before the AI can produce meaningful results, it needs two key things:</p><h3>1. Proper Context</h3><p>Give it a full understanding of your codebase: structure, architecture, style conventions, naming, and logic.<br> Without this, it’s working blind.</p><h3>2. Clear Requirements</h3><p>Spell out what you want — don’t assume the AI will guess.<br> Define the input, expected output, rules, and edge cases. Treat it like you would a junior developer.</p><h3>🧠 The Workflow: From Prompt to Execution</h3><p>We tested and refined a hands-on AI workflow with four key components — and it worked.</p><p>Here are the tools we used and how they fit together:</p><h3>🛠️ The Core Tools</h3><h3>1️⃣ <a href="https://github.com/yamadashy/repomix">Repomix</a></h3><p>We used Repomix to inject the <strong>actual project codebase</strong> into the AI’s memory.<br> This gave the agent deep context — helping it write code that fit naturally into the existing architecture.</p><h3>2️⃣ Google AI Studio</h3><p>Here we created a <strong>Product Requirements Document (PRD)</strong> — outlining user stories, flows, business logic, and constraints.<br> Think of it as the AI’s playbook.</p><h3>3️⃣ <a href="https://www.task-master.dev/">Task Master (MCP)</a></h3><p>This is our AI Product Manager.<br> It takes the PRD and breaks it into sequential, digestible tasks with proper framing — and feeds them to the AI one by one.</p><h3>4️⃣ Cursor IDE</h3><p>This is where the AI writes code.<br> We provide the tasks, context, and instructions here — and the AI agent implements the features.</p><h3>🧠 What Task Master Actually Does</h3><p><strong>Task Master is your AI Agent’s Product Manager.</strong><br> It takes your big-picture requirements and turns them into clear, organized tasks that the AI can actually execute.</p><p>Just like a real product manager, it makes sure the AI knows:</p><ul><li><strong>What to do</strong></li><li><strong>When to do it</strong></li><li><strong>How to stay on track</strong></li></ul><h3>Here’s what Task Master handles:</h3><ul><li>📝 <strong>Understands your PRD (Product Requirements Document)</strong> — the full scope of what you’re trying to build</li><li>🧩 <strong>Breaks it down into smaller, actionable tasks</strong> — each with a clear goal and expected outcome</li><li>🔀 <strong>Sets priorities and task order</strong> — so the AI knows what to do first and what depends on what</li><li>🧠 <strong>Provides only the context needed for each task</strong> — so the AI stays focused and doesn’t get overwhelmed</li><li>🔁 <strong>Handles failure and retries</strong> — if a task fails, it helps the AI pick up from where it left off</li></ul><blockquote><em>📌 Think of it like this:<br> </em><strong><em>Task Master is the product manager. Your AI agent is the developer.</em></strong></blockquote><h3>🗺️ The Big Picture: AI Workflow in 4 Steps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cjY2zhLVNuoIwvJ9lfsww.png" /></figure><h3>💡 Lessons Learned</h3><ul><li><strong>You are the manager now.</strong> Don’t write code — guide, review, and test instead.</li><li>Tools like <strong>Anthropic’s </strong>are highly capable thanks to large context windows (tokens). Use them to inject full PRDs or entire class trees.</li><li>If the AI stalls or breaks on a task after retrying “continue,” just copy the request ID, restart the session, and let Task Master recover the task state.</li></ul><h3>✅ Final Thoughts</h3><p>AI doesn’t replace good developers — it <strong>amplifies</strong> the ones who know how to manage it.</p><p>With the right system:</p><ul><li>You lead with clear direction.</li><li>You feed it with just enough context.</li><li>You monitor, test, and refine.</li><li>It builds.</li></ul><p>But if you skip the structure, you’ll end up debugging hallucinated code you never asked for.</p><p><strong>Tags</strong>:<br> #AI #PromptEngineering #AITools #CursorIDE #TaskMaster #LLM #Repomix #AIWorkflow #AutonomousAgents #Claude #ProductDevelopment #TechLeadership #BuildWithAI #MediumTech</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3201fc11577a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>