[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A38BZJTMFAHK5WEBVR6JZV":3,"skill-same:01M7A38BZJTMFAHK5WEBVR6JZV":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M7A38BZJTMFAHK5WEBVR6JZV","laravel-code-audit",null,"Systematic logic audit for Laravel\u002FFilament codebases.","12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI","12103541","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F48291538?v=4","01M7A2PSM93DH9YY7EHRK5RF27","NAWAWI","01M7A2PSMSGV0S7KCD9312BN4M",0,"MIT","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: laravel-code-audit\ndescription: \"Systematic logic audit for Laravel\u002FFilament codebases.\"\nversion: 1.0.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [laravel, audit, code-review, architecture, php, filament]\n    related_skills: [requesting-code-review, systematic-debugging]\n---\n\n# Laravel Code Audit — Architecture & Logic Review\n\nSystematic layer-by-layer audit of existing Laravel codebases to find logic\nerrors, architectural problems, and design inconsistencies.\n\n**When to use:** User asks you to \"review\", \"check\", \"audit\", \"evaluate\",\n\"cari bug\", \"periksa logic\" on a Laravel\u002FFilament codebase, especially\nERP or business applications.\n\n**Not for:** Pre-commit verification of staged changes — use\n`requesting-code-review` for that. Bug reproduction & root cause — use\n`systematic-debugging`.\n\n## Audit Sequence\n\nAlways audit in this order. Each layer depends on the layer before it —\na model fix cascades up; a config fix cascades down.\n\n---\n\n### 1. Models — the data contract\n\n| Check | What to look for |\n|-------|-----------------|\n| `$fillable` \u002F `$guarded` | Missing fields that should be mass-assignable |\n| `casts()` | Decimal\u002Fdate\u002Fjson casts correct? Nullable casts? |\n| `$table` | Custom table names match migration? |\n| Relationships | Correct type (belongsTo\u002FhasMany\u002FhasOne), correct foreign\u002Flocal keys |\n| `boot()` events | `saving`\u002F`updated`\u002F`deleted` — infinite loop guards (`wasChanged()`)? |\n| Traits used (`use ...`) | Do trait methods actually exist? Correct namespace? |\n| Scopes (`scopeX`) | SQL correctness, index usage |\n| Accessors (`getXAttribute`) | Null safety on chained relations (`$this->relation?->field`) |\n\n**Common Laravel model bugs found during audit:**\n- `\\ValidationException` thrown without FQCN (should be `\\Illuminate\\Validation\\ValidationException`)\n- `wasChanged()` check missing in `updated` events → infinite save loops\n- Cast mismatch: `decimal:2` on fields that store formatted strings\n- `$fillable` missing JSON columns → `update()` silently ignores them\n\n### 2. Services — the business logic\n\n| Check | What to look for |\n|-------|-----------------|\n| Transaction boundaries | Multi-step ops wrapped in `DB::transaction()`? |\n| Input validation | Validated before processing, not in the middle |\n| State machine | Status transitions enforced? Illegal transitions blocked? |\n| Side effects | Notifications\u002Flogs\u002Finventory updates atomic with main op? |\n| Duplicate logic | Same validation\u002Frepetitive code in multiple methods |\n| Constants vs literals | Business rules (percentages, limits) in config, not hardcoded |\n| Error messages | User-friendly, specific, actionable (not generic \"error\") |\n| N+1 queries | `->load()` or eager-loading in service methods? |\n\n### 3. Filament Resources & Pages — the UI layer\n\n| Check | What to look for |\n|-------|-----------------|\n| `canAccess()` | Hardcoded `in_array(role, [...])` or proper `hasPermission()`? |\n| Form `live()` + `afterStateUpdated` | Data consistency across interdependent fields |\n| Relationship selects | `->relationship('x')` (needs model context) vs manual `->options()` |\n| Hidden \u002F dehydrated | `user_id`, `created_by` auto-set? Disabled fields that still submit? |\n| Table actions | Side effects on status change call the right service\u002Fmodel methods? |\n| Tax \u002F PPN calculations | Config-driven or hardcoded percentage? |\n| Auth:: vs auth()-> | Mix of facade and helper (facade import may be missing if helper removed) |\n| **Login override (username instead of email)** | Filament v3 custom login extends `Filament\\\\Pages\\\\Auth\\\\Login` — must override `getForms()`, provide `getUsernameFormComponent()`, override `getCredentialsFromFormData()` to return `['username' => ..., 'password' => ...]`, and override `throwFailureValidationException()` referencing `data.username`. Register via `->login(\\\\App\\\\Filament\\\\Pages\\\\Auth\\\\Login::class)` in PanelProvider. Cache clear: `php artisan optimize:clear && php artisan filament:cache-components`. |\n| **Form Section `visible()` + Livewire state** | `Section::make(...)->visible(fn () => $this->something)` — if `something` gets SET after user action (e.g. preview), the section **disappears** along with all its fields. `form->getState()` returns null for those fields → silent failure. Fix: remove the `!$this->something` condition or track separately. |\n\n**Common Filament audit findings:**\n- PPN hardcoded as `0.11` instead of reading from `config('pajak.tarif_ppn_keluaran')`\n- Horizontal form grid broken because Section wraps everything in columns\n- `->relationship()` used on standalone Pages where it doesn't work\n- Action `visible()` conditions that leak to unauthorized roles\n\n### 3b. RBAC Coherence — permission system audit\n\nAfter auditing individual canAccess() calls, check the permission system holistically:\n\n| Check | What to look for |\n|-------|-----------------|\n| `config\u002Fpermissions.php role_map` | Does every role have the permissions it needs? Missing permissions cause hidden menus. |\n| `DeptAccessService::NAV_ACCESS` | Does every slug mapping match the config role_map? Drift = some users see extra menus or miss expected ones. |\n| `hasPermission()` kode arguments | Cross-reference every kode string against `config\u002Fpermissions.php permissions[].kode`. Typo = dead permission. |\n| SDM pages `return false` | If SDM pages are hard-disabled with `return false`, HRD users see no SDM menu even though they have `sdm.*` permissions. |\n| Login page `canAccess()` | Login page must NOT restrict access — it's the entry point. If it returns false, no one can log in. |\n| Hardcoded check vs permission | Grep `in_array.*role` in `app\u002FFilament\u002FPages\u002F` and `in_array.*role` in custom `canAccess()` methods. Every hit is a bypass candidate. |\n\n**Audit command:**\n```bash\n# Compare DeptAccessService against config permissions\ngrep -oP \"'\\K[^']+(?='\\s*=>\\s*\\[)\" app\u002FServices\u002FDeptAccessService.php | sort > \u002Ftmp\u002Fdept_slugs.txt\ngrep -oP \"'kode'\\s*=>\\s*'\\K[^']+\" config\u002Fpermissions.php | sort > \u002Ftmp\u002Fperm_kodes.txt\ndiff \u002Ftmp\u002Fdept_slugs.txt \u002Ftmp\u002Fperm_kodes.txt 2>\u002Fdev\u002Fnull || echo \"Compare manually\"\n\n# Find hardcoded role checks\ngrep -rn \"in_array.*role\\|auth()->user()->role\" app\u002FFilament\u002F 2>\u002Fdev\u002Fnull\n```\n\n**Common RBAC audit findings:**\n- Permission name mismatch between config and canAccess() call (e.g. `smart_pricing.view` vs `penawaran.smart_pricing.view`)\n- DeptAccessService allows roles that config role_map denies, or vice versa\n- SDM pages all `return false` — HRD users see 0 SDM menus despite having all `sdm.*` permissions\n- Hardcoded `role === 'R00'` locks pages permanently to Super Admin only (e.g. CompanySettingPage, WorkflowDetailPage)\n- Config permissions exist for a modul but ALL Filament pages\u002Fresources for that modul are disabled or return false\n\n### 4. Traits — shared behavior\n\n| Check | What to look for |\n|-------|-----------------|\n| All methods actually called? | Grep for each method name across project |\n| Dead stubs | `return true;` without logic, empty methods |\n| Namespace correctness | Exceptions\u002Fclasses referenced in traits |\n| `bootTraitName()` | Static boot methods in Eloquent traits fire correctly? |\n\n### 5. Config, Exceptions & Commands — sources of truth\n\n| Check | What to look for |\n|-------|-----------------|\n| Config vs hardcoded | Are business rules (PPN, limits, paths) in config files? |\n| `env()` in config only | `env()` called outside `config\u002F*.php` won't cache properly |\n| Exception handler | Proper rendering per environment, logging level |\n| Environment-specific paths | Hardcoded `C:\u002Flaragon\u002F...` or `C:\u002Fxampp\u002F...` in Services? |\n| Console commands | Schedule correctness, error handling, output formatting |\n| **Command model references** | Every `\\App\\Models\\Xxx` referenced in `app\u002FConsole\u002FCommands\u002F*.php` must be a real class. Grep `class Xxx` under `app\u002FModels\u002F` to verify |\n| **Command mass-assignment match** | Direct `Model::create(...)` or `Model::update(...)` in Commands may pass columns not in `$fillable`. Always read the target model's `$fillable` array and compare. Silent discard = invisible data loss |\n| **Serial number generation** | `while(...->exists())` loops with increment must rebuild the query inside the loop, not reference a stale Builder from outside |\n\n### 6. Filament Widgets — dashboard data layer\n\n| Check | What to look for |\n|-------|-----------------|\n| Column name correctness | `DATE_FORMAT(tanggal, ...)` — verify column exists in the table's migration\u002FSchema |\n| Cross-widget consistency | Same metric (e.g. pengeluaran per bulan) computed the same way across all dashboard files |\n| N+1 via closures | Widgets that call `Model::count()` inside loops or per-item callbacks |\n| Empty-state guard | `array_keys($data) ?: ['Belum Ada Data']` — silent 0\u002Fempty chart fallback |\n\n---\n\n## Common Bug Patterns Reference\n\n| Pattern | Likely Cause | Grep \u002F Search |\n|---------|-------------|---------------|\n| `\\ValidationException` fatal | Wrong namespace (no `\\Illuminate\\Validation\\` prefix) | `throw new \\\\V` in traits |\n| PPN hardcoded | Config not consulted | `0.11`, `0.12`, `'PPN (11%)'` |\n| `visible()` condition + Livewire state toggle | Section\u002Faction hidden after user triggers action that sets state var (`!$this->previewData`) | `visible.*\\$this->` in Pages\u002F (check for negative state checks) |\n| N+1 helperText | Per-render DB query in form `helperText()` closure — fires every Livewire re-render | `helperText.*::(find\\|where\\|cari\\|search)` in Resources\u002FPages |\n| Real-time `live()` on inputs | 1 server request per keystroke for formatting\u002Fvalidation | `->live()` in form schema (should be `->live(onBlur: true)`) |\n| Batch update bypassing Eloquent events | `Model::where(...)->update(...)` in commands\u002Fcontrollers doesn't fire `updated` event | `->where\\(.*\\)->update\\(` (not on `$model` instance) |\n| Duplicate sync logic | Model `boot()` event + RelationManager `after()` both do same status sync → double processing | `boot.*saved` AND `after` in same feature area |\n| N+1 matching loop | Service calls DB query per item in loop (e.g. `matchToSparepart()` inside `foreach`) instead of preloading + in-memory match | `::find\\|::where\\|->first()` inside `foreach` in Services\u002F |\n| `saveAll()` before single-purpose op | Page calls full save (delete+reinsert+recalc) before kirim\u002Fexport when only 1-2 fields need sync | `saveAll()` called before `kirim\\|generate\\|export` in Pages\u002F |\n| Role bypass in canAccess | RBAC not centralized | `in_array.*->role` in Resources |\n| Dead trait stub | Abandoned refactor | `return true;` in trait methods |\n| Windows-only paths | Hardcoded in Services | `C:\u002F` in files under `app\u002F` |\n| `Auth::` without import | Copied code, facade removed | `Auth::` without `use ...Facades\\Auth` |\n| Infinite event loop | Missing `wasChanged()` gate | `static::updated` without `wasChanged` |\n| Infinite loop in code number gen | `$existsQuery` built ONCE outside while, `$nomor` incremented inside but query never rebuilt | `while.*->exists()` in Traits |\n| Wrong class name in CLI command | Copied from different project\u002Fpackage, model class doesn't exist | `\\\\App\\\\Models\\\\` in `Commands\u002F` |\n| Widget column name mismatch | Different widgets query same table with different column names (e.g. `tanggal` vs `tanggal_pengeluaran`) | `DATE_FORMAT\\(` in `Filament\u002FWidgets\u002F` |\n| Formula logic inversion | Subset treated as independent count (e.g. `approved \u002F (approved + lateApproved)` when late is subset of approved) | `\u002F \\(.* \\+ .*\\)` in reporting\u002Fcontrollers |\n| Invalid status string | Status constant doesn't exist in model | Chain: find `->where('status',` → grep model for constant\u002Fvalid values |\n| Default-allow security | Unknown slugs return `true` in access service instead of `false` | `return true` in DeptAccess\u002FServices |\n| **Partial fix syndrome** | Class name corrected but `::create()` still passes wrong column names (ActivityLog `caused_by`\u002F`properties`\u002F`log_name` after `Activity`→`ActivityLog` fix) | `::create\\\\(\\\\[` near `ActivityLog` in Commands — compare each key against model `$fillable` |\n| **Integer cast missing** | `stok`, `safety_stock`, `reorder_point` not cast to `integer` in model — string comparison breaks `\u003C=` logic | Check `casts()` for `'stok' => 'integer'` in model files with numeric inventory\u002Fquantity fields |\n| **Null safety on date accessor** | `$this->tanggal_penawaran->copy()->addDays(...)` crashes if date field is null | `->.*copy\\\\(\\\\)\\|->.*addDays\\\\(` on date casts in Accessors — check null guard |\n| **Hardcoded role check in Pages** | Custom Filament Pages use `in_array(Auth::user()->role, ['R00', ...])` instead of `hasPermission()`, bypassing DB permission system | `in_array\\\\\\\\(.*->role` in `app\u002FFilament\u002FPages\u002F` — every hit is a bypass candidate |\n| **Nilai efektif progres** | `hitungProgresOtomatis()` \u002F `WorkflowIndicatorService::calculate()` uses `$this->nilai` (initial) instead of `$this->nilai_efektif` (including adendum) — progres overstates completion | `hitungProgresOtomatis()` in Kontrak model, `WorkflowIndicatorService::calculate()` — check which `nilai` is referenced |\n| **Duplicate workflow systems** | Two independent workflow implementations: pipeline (7-stage from contracts) + WorkflowProyek\u002FWorkflowStep\u002FWorkflowTahapan models — causes user confusion & inconsistent progress | Search for both `WorkflowIndicatorService` AND `WorkflowProyek`\u002F`WorkflowStep`\u002F`WorkflowTahapan` models. If both exist, consolidate to one. |\n| **Missing overdue detection** | Contracts past `tgl_akhir` with status `active`\u002F`berjalan` not flagged — no visual\u002Fautomated alert | Check if service computing progress also checks `tgl_akhir \u003C now()` for active contracts |\n| **Professional pipeline UI pattern** | Raw circles + labels → needs: status badge, gradient progress bar, animated active\u002Foverdue nodes, legend with counts | `resources\u002Fviews\u002Fcomponents\u002Fworkflow-indicator.blade.php` — reference for future Filament ERP pipeline displays |\n| **RBAC dual-system drift** | `DeptAccessService::NAV_ACCESS` hardcoded array and `config\u002Fpermissions.role_map` define different access for same module — two sources of truth silently disagree | Compare `DeptAccessService.php` `NAV_ACCESS` keys against `config\u002Fpermissions.php` `role_map` |\n| **Permission name mistmatch** | `hasPermission('penawaran.smart_pricing.view')` in code vs `smart_pricing.view` in config — $permissionKode not found in DB → false for all non-R00 users | `hasPermission\\\\(` — cross-reference each kode against `config\u002Fpermissions.php` `kode` array |\n\n---\n\n## Patch Tool Pitfall — PHP Backslash Namespaces\n\nWhen editing PHP files that contain namespace separators like\n`\\Illuminate\\Validation\\`, the `patch` tool may **double the backslashes**\n(`\\\\` → `\\\\\\\\`), producing syntax errors.\n\n**Fix:** Use `write_file` to rewrite the entire file instead of `patch`.\nOr use `patch` on only the non-backslash portions (e.g. variable names,\nmethod bodies) and check syntax with `php -l \u003Cfile>` after each edit.\nIf the patch tool mangles backslashes, immediately switch to `write_file`.\n\n---\n\n## Verification After Fixing\n\nEvery file you modify MUST pass syntax check:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fproject && php -l app\u002FPath\u002FTo\u002FFile.php\n```\n\nVerify config-driven values are actually read:\n```bash\ngrep -r \"config('pajak.tarif\" app\u002F\n```\n\n## Runtime Recovery — Empty DB \u002F Login Failure\n\n**Symptom:** User can't login (\"superadmin tidak bisa masuk\"), login rejects valid credentials, or app shows zero data everywhere.\n\n**First check — is the DB empty?** Migrations present but 0 rows = DB wiped (`migrate:fresh` without seed, or manual drop). This is NOT a code bug — do not start auditing auth logic.\n\n```bash\nphp artisan tinker --execute=\"dump(DB::table('users')->count()); dump(Schema::hasTable('users'));\"\n# count=0 + hasTable=true → DB wiped\n```\n\nQuick full-DB emptiness probe (all-zero table_rows = fresh DB):\n```bash\n\"C:\u002Flaragon\u002Fbin\u002Fmysql\u002Fmysql-8.0.30-winx64\u002Fbin\u002Fmysql.exe\" -h127.0.0.1 -uroot \\\n  -e \"SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema='aplikasi_kantor' ORDER BY table_rows DESC LIMIT 12;\"\n```\n\n**Pitfall: `mysql` is NOT on git-bash PATH.** Use full Laragon bin path — version dir varies (`ls \"C:\u002Flaragon\u002Fbin\u002Fmysql\u002F\"` to find it).\n\n**Recovery:**\n1. Restore full backup from project root:\n   `\"C:\u002Flaragon\u002Fbin\u002Fmysql\u002Fmysql-8.0.30-winx64\u002Fbin\u002Fmysql.exe\" -h127.0.0.1 -uroot aplikasi_kantor \u003C aplikasi_kantor_backup.sql`\n   (full dump incl. users table; ~33 INSERTs. Verify: `SELECT id,username,role FROM users;` — superadmin id=1, role R00)\n2. Reset superadmin password (user standard = `password123`):\n   `php artisan tinker --execute=\"App\\Models\\User::where('username','superadmin')->update(['password'=>bcrypt('password123')]);\"`\n3. Verify login: `php artisan tinker --execute=\"dump(Auth::attempt(['username'=>'superadmin','password'=>'password123']));\"` → `true`\n\n## Workflow Chain Test Order (Imperative — User Preference, ERP-specific)\n\n**NEVER test features in isolation.** The material\u002Ffinancial flow MUST be tested in its complete chain order — skipping stages produces invalid results and hides inter-stage data bugs. This is an explicit user preference from 2026-07-29.\n\n### Primary Chain: Kontrak → Sparepart → Finance\n\nCorrect order for any ERP test simulation involving sparepart\u002Fproject workflow:\n```\nKONTRAK\n  ↓\nRAB (Insert items — harga satuan dari file import)\n  ↓\nBOM (Bill of Materials — auto-generate via RabMaterialPlanService::generateFromRab)\n  ↓\nAktivasi BOM oleh Gudang (R04 — via RabMaterialPlanService::activate)\n  ↓\nPekerjaan (dibuat oleh Admin, dikerjakan oleh Teknisi R02)\n  ↓\nTransaksi Keluar (sparepart terpakai, auto-decrement stok, auto-sync BOM realisasi)\n  ↓\nFaktur (tagih berdasarkan transaksi keluar + PPN config-driven 12%)\n  ↓\nPembayaran (auto-update faktur→lunas via Pembayaran::booted()::saved())\n```\n\n**Why chain order matters:**\n- RAB is the BASIS for BOM — tanpa RAB, gudang tidak punya acuan\n- BOM is the BASIS for sparepart mapping — tanpa sparepart_id, TransaksiKeluar tidak bisa diproses\n- Transaksi Keluar is the BASIS for invoicing — tanpa transaksi keluar, faktur tidak punya dasar\n- User is learning the logic — test urut agar alur kerja divisi bisa dipantau\n- Workflow proyek harus BERURUTAN agar role progres teratur\n\n**Pitfall:** Previous sessions skipped RAB→BOM→Mapping→TransaksiKeluar and jumped straight to Faktur→Pembayaran. This was explicitly CORRECTED by the user (2026-07-29). Do NOT repeat — always run the full chain.\n\n**Two complementary sequences exist:** Role-based sequence (who does what) lives in the project's RULES.md \u002F erp-rules skill. This section defines the data flow order (what order data must travel). Both must be followed; they are not alternatives.\n\n### Running Multi-Step Scripts\n\nWrite a `.php` file, then run via tinker (not direct `php`):\n```bash\nphp artisan tinker --execute=\"require '_workflow_test.php'\"\n```\nScript must include proper `use` imports. Auth is needed before calling services that check `Auth::id()`.\n\nKey service calls in order:\n```php\n\u002F\u002F Step 1-2: RAB → BOM\n$plan = app(RabMaterialPlanService::class)->generateFromRab($rab);\n\n\u002F\u002F Step 3: Aktivasi BOM oleh Gudang\nAuth::loginUsingId($gudangUser->id); \u002F\u002F must be role R04\napp(RabMaterialPlanService::class)->activate($plan);\n\n\u002F\u002F Step 4-5: Pekerjaan → TransaksiKeluar (stok auto-decrement via booted)\n$pekerjaan = Pekerjaan::create(['kontrak_id' => $id, 'user_id' => $teknisi->id, 'status' => 'approved', ...]);\nTransaksiKeluar::create([\n    'sparepart_id' => $sparepartId,\n    'quantity' => $qty,\n    'pekerjaan_id' => $pekerjaan->id,\n    'teknisi_id' => $teknisi->id,\n    'harga_jual' => $hargaJual,\n    'status_tagih' => 'belum_tertagih',\n    'tipe' => 'keluar',\n]);\n\n\u002F\u002F Step 6: Faktur (direct terbit, skip draft)\n$faktur = Faktur::create([\n    'kontrak_id' => $id,\n    'subtotal' => $total, 'ppn' => round($total * 0.12), 'total_tagihan' => $total + $ppn,\n    'status' => 'terbit',\n]);\n\n\u002F\u002F Step 7: Pembayaran → auto-lunas\nPembayaran::create(['faktur_id' => $faktur->id, 'jumlah' => $totalTagihan, ...]);\n```\n\n### Auto-Create Sparepart from Unmapped BOM Items\n\nWhen BOM has items without `sparepart_id` (no matching sparepart in DB), batch-create sparepart from unique item names:\n\n```php\n$unmapped = RabMaterialPlanItem::where('plan_id', $planId)\n    ->whereNull('sparepart_id')->where('tipe_item', '!=', 'jasa')->get();\n\n$uniqueItems = $unmapped->groupBy('uraian_item'); \u002F\u002F dedup by name\n\nforeach ($uniqueItems as $uraian => $items) {\n    $existing = Sparepart::whereRaw('LOWER(TRIM(nama_part)) = ?', [trim(mb_strtolower($uraian))])->first();\n    if ($existing) {\n        foreach ($items as $item) $item->update(['sparepart_id' => $existing->id]);\n        continue;\n    }\n    $sp = Sparepart::create([\n        'sku' => 'SP-' . str_pad(++$lastSkuId, 5, '0', STR_PAD_LEFT),\n        'nama_part' => $uraian,\n        'kategori' => 'PROYEK', \u002F\u002F REQUIRED — no DB default!\n        'stok' => 1000,\n        'harga' => $first->harga_satuan_rab,\n        'harga_jual' => $first->harga_satuan_rab,\n    ]);\n    foreach ($items as $item) $item->update(['sparepart_id' => $sp->id, 'tipe_item' => 'sparepart']);\n}\n```\n\n**Pitfalls specific to the sparepart chain:**\n- **Sparepart `kategori` field has NO default value** — `Sparepart::create()` without `'kategori'` throws SQL error 1364. Always include kategori.\n- **TransaksiKeluar auto-decrements stok via booted()** — `TransaksiKeluar::booted()::created()` calls `decrementStok()` automatically. Do NOT manually `$sp->decrement('stok', ...)` after creating record — that double-deducts.\n- **RAB must have kontrak_id** — orphan RABs (kontrak_id=NULL) cannot be reached by `syncFromTransaksiKeluar()` which traverses `pekerjaan→kontrak→RAB→BOM`.\n- **BOM fuzzy mapping is approximate** — when only 5 sparepart exist, 518-item RAB maps only ~81 items, many wrong. Use auto-create-sparepart approach for production data.\n\n---\n\n## Pitfalls\n\n- **Patch tool + PHP namespaces** — see note above\n- **Layer skipping** — don't jump to config before checking models; a model bug\n  makes service\u002Fresource changes pointless\n- **Over-auditing** — focus on CRITICAL\u002FHIGH findings first (namespace errors,\n  security bypasses, config mismatches). Present lower-severity items as notes\n- **Reading too many files** — sample strategically: 1-2 models, 1-2 services,\n  1-2 resources, then the traits and config. Don't read 500 files\n- **False urgency** — the user wants quality findings, not speed. Validate\n  each finding before reporting\n- **Language mismatch** — user may describe bugs in Bahasa Indonesia but code\n  is in English; report findings in the language the user initiated\n- **Command $fillable mismatch** — when a CLI command calls `Model::create([...])` directly (not through a service\u002Fstatic method), cross-reference every key against the model's `$fillable` array. Silent mass-assignment discard = invisible data loss. The `created`\u002F`updated` event still fires, so bugs hide at the database layer\n- **Sparepart numeric fields** — `stok`, `safety_stock`, `reorder_point` etc. must be cast to `integer`. Without cast, PHP `\u003C=` becomes string comparison (`\"9\" \u003C= \"10\"` = false). Check `casts()` for `'integer'` on all numeric inventory\u002Fquantity fields\n- **Date accessor null crash** — `$this->date_field->copy()->addDays(...)` throws FatalError if date_field is nullable and null. Always guard with `$this->date_field ? $this->date_field->copy()... : null`\n- **Hardcoded role checks in custom Pages** — all Filament Resources may use `hasPermission()`, but custom Pages (standalone `Filament\\\\Pages\\\\Page`) often use `in_array(role, [...])`. After auditing Resources, grep `app\u002FFilament\u002FPages\u002F` for `in_array.*role`\n- **RBAC dual system drift** — when auditing access control, ALWAYS check both `config\u002Fpermissions.role_map` AND `DeptAccessService::NAV_ACCESS`. They are independent systems. A role can have permission via config but still be denied by DeptAccessService, or vice versa. Grep both. Cross-reference.\n- **Permission name prefix mismatch** — `hasPermission('penawaran.smart_pricing.view')` vs config `smart_pricing.view` (no `penawaran.` prefix). Always cross-reference the exact kode string in `config\u002Fpermissions.php permissions[].kode`.\n- **Duplicate workflow systems** — check for both `WorkflowIndicatorService` (pipeline 7-stage from contracts) AND `WorkflowProyek`\u002F`WorkflowStep`\u002F`WorkflowTahapan` models. If both exist, consolidate to one. User confusion & inconsistent progress reporting. See `references\u002Fworkflow-monitoring-redesign-20260729.md`.\n- **Missing overdue detection** — contracts past `tgl_akhir` with status `active`\u002F`berjalan` not flagged — no visual\u002Fautomated alert. Check if progress service also checks `tgl_akhir \u003C now()` for active contracts.\n- **Professional pipeline UI pattern** — raw circles + labels → needs: status badge, gradient progress bar, animated active\u002Foverdue nodes, legend with counts. See `resources\u002Fviews\u002Fcomponents\u002Fworkflow-indicator.blade.php` — reference for future Filament ERP pipeline displays.\n- **KontrakResource View page** — embed pipeline indicator using `ViewEntry::make('pipeline')->view('filament.resources.kontrak-resource.partials.pipeline-indicator')` with `getStateUsing(fn() => ...)` for dynamic stage data from `WorkflowIndicatorService::calculate($record)`. Use `Placeholder` components only for static summary cards; for dynamic calculated values use `TextEntry::make('...')->getStateUsing(fn() => ...)`.\n- **Cleanup orphan systems** — when removing duplicate models (e.g. WorkflowProyek), also remove: Resource, Pages, Widgets, Migrations, and verify no FK references remain in other models (e.g. WorkflowLog::tahapan()).\n- **Permission name prefix mismatch** — `hasPermission('penawaran.smart_pricing.view')` vs config `smart_pricing.view` (no `penawaran.` prefix). Always cross-reference the exact kode string in `config\u002Fpermissions.php permissions[].kode`.\n\n---\n\n## Real-World References\n\nSession-specific audit logs live under `references\u002F` in this skill directory:\n\n| File | Session | Focus |\n|------|---------|-------|\n| `references\u002Ferp-audit-example.md` | 2026-07-28 | Batch 1: Models, Services, Resources, Traits, Config |\n| `references\u002Ferp-audit-batch3.md` | 2026-07-29 | Batch 3: Traits, Commands, Widgets, Controllers, Security |\n| `references\u002Ferp-audit-batch4.md` | 2026-07-29 | Batch 4: Workflow chain audit, RAB import fix, performance, login override |\n| `references\u002Ferp-audit-batch5.md` | 2026-07-29 | Batch 5: Full re-audit — 81 models, 21 services, 31 resources, bugs found: ActivityLog columns, role bypass, Sparepart casts, date null safety |\n| `references\u002Ferp-audit-rbac.md` | 2026-07-29 | RBAC audit: menu-per-role analysis, DeptAccessService vs config drift, 4 hardcoded role checks, HargaReferensi permission mismatch |\n| `references\u002Ferp-cipali-production-setup-20260730.md` | 2026-07-30 | CIPALI production: orphan RAB 518 item → kontrak → BOM → auto-create 162 sparepart → aktivasi gudang. Code patterns + error traces |\n\nLoad with `skill_view(name='laravel-code-audit', file_path='references\u002F\u003Cfile>')`.\n\n## Reusable Test Script\n\nA reusable workflow-chain verification script (`scripts\u002Ftest-workflow-chain.php`)\nverifies Klien → Kontrak → Termin → Pekerjaan → Faktur → Pembayaran → Aset\nauto-cascade events. Copied to project `scripts\u002F` dir and run from project root:\n\n```bash\nphp scripts\u002Ftest-workflow-chain.php\nphp scripts\u002Ftest-workflow-chain.php --with-jatuh-tempo  # includes overdue + partial pay\nphp scripts\u002Ftest-workflow-chain.php --with-adendum      # includes contract revision\nphp scripts\u002Ftest-workflow-chain.php --keep              # keep test data\n```\n\nThe script creates test data, runs all workflow steps, auto-cleans on exit.\nReturns exit code 0 on all-pass, 1 on any failure.\n","# Laravel Code Audit — Architecture & Logic Review\n\nSystematic layer-by-layer audit of existing Laravel codebases to find logic\nerrors, architectural problems, and design inconsistencies.\n\n**When to use:** User asks you to \"review\", \"check\", \"audit\", \"evaluate\",\n\"cari bug\", \"periksa logic\" on a Laravel\u002FFilament codebase, especially\nERP or business applications.\n\n**Not for:** Pre-commit verification of staged changes — use\n`requesting-code-review` for that. Bug reproduction & root cause — use\n`systematic-debugging`.\n\n## Audit Sequence\n\nAlways audit in this order. Each layer depends on the layer before it —\na model fix cascades up; a config fix cascades down.\n\n---\n\n### 1. Models — the data contract\n\n| Check | What to look for |\n|-------|-----------------|\n| `$fillable` \u002F `$guarded` | Missing fields that should be mass-assignable |\n| `casts()` | Decimal\u002Fdate\u002Fjson casts correct? Nullable casts? |\n| `$table` | Custom table names match migration? |\n| Relationships | Correct type (belongsTo\u002FhasMany\u002FhasOne), correct foreign\u002Flocal keys |\n| `boot()` events | `saving`\u002F`updated`\u002F`deleted` — infinite loop guards (`wasChanged()`)? |\n| Traits used (`use ...`) | Do trait methods actually exist? Correct namespace? |\n| Scopes (`scopeX`) | SQL correctness, index usage |\n| Accessors (`getXAttribute`) | Null safety on chained relations (`$this->relation?->field`) |\n\n**Common Laravel model bugs found during audit:**\n- `\\ValidationException` thrown without FQCN (should be `\\Illuminate\\Validation\\ValidationException`)\n- `wasChanged()` check missing in `updated` events → infinite save loops\n- Cast mismatch: `decimal:2` on fields that store formatted strings\n- `$fillable` missing JSON columns → `update()` silently ignores them\n\n### 2. Services — the business logic\n\n| Check | What to look for |\n|-------|-----------------|\n| Transaction boundaries | Multi-step ops wrapped in `DB::transaction()`? |\n| Input validation | Validated before processing, not in the middle |\n| State machine | Status transitions enforced? Illegal transitions blocked? |\n| Side effects | Notifications\u002Flogs\u002Finventory updates atomic with main op? |\n| Duplicate logic | Same validation\u002Frepetitive code in multiple methods |\n| Constants vs literals | Business rules (percentages, limits) in config, not hardcoded |\n| Error messages | User-friendly, specific, actionable (not generic \"error\") |\n| N+1 queries | `->load()` or eager-loading in service methods? |\n\n### 3. Filament Resources & Pages — the UI layer\n\n| Check | What to look for |\n|-------|-----------------|\n| `canAccess()` | Hardcoded `in_array(role, [...])` or proper `hasPermission()`? |\n| Form `live()` + `afterStateUpdated` | Data consistency across interdependent fields |\n| Relationship selects | `->relationship('x')` (needs model context) vs manual `->options()` |\n| Hidden \u002F dehydrated | `user_id`, `created_by` auto-set? Disabled fields that still submit? |\n| Table actions | Side effects on status change call the right service\u002Fmodel methods? |\n| Tax \u002F PPN calculations | Config-driven or hardcoded percentage? |\n| Auth:: vs auth()-> | Mix of facade and helper (facade import may be missing if helper removed) |\n| **Login override (username instead of email)** | Filament v3 custom login extends `Filament\\\\Pages\\\\Auth\\\\Login` — must override `getForms()`, provide `getUsernameFormComponent()`, override `getCredentialsFromFormData()` to return `['username' => ..., 'password' => ...]`, and override `throwFailureValidationException()` referencing `data.username`. Register via `->login(\\\\App\\\\Filament\\\\Pages\\\\Auth\\\\Login::class)` in PanelProvider. Cache clear: `php artisan optimize:clear && php artisan filament:cache-components`. |\n| **Form Section `visible()` + Livewire state** | `Section::make(...)->visible(fn () => $this->something)` — if `something` gets SET after user action (e.g. preview), the section **disappears** along with all its fields. `form->getState()` returns null for those fields → silent failure. Fix: remove the `!$this->something` condition or track separately. |\n\n**Common Filament audit findings:**\n- PPN hardcoded as `0.11` instead of reading from `config('pajak.tarif_ppn_keluaran')`\n- Horizontal form grid broken because Section wraps everything in columns\n- `->relationship()` used on standalone Pages where it doesn't work\n- Action `visible()` conditions that leak to unauthorized roles\n\n### 3b. RBAC Coherence — permission system audit\n\nAfter auditing individual canAccess() calls, check the permission system holistically:\n\n| Check | What to look for |\n|-------|-----------------|\n| `config\u002Fpermissions.php role_map` | Does every role have the permissions it needs? Missing permissions cause hidden menus. |\n| `DeptAccessService::NAV_ACCESS` | Does every slug mapping match the config role_map? Drift = some users see extra menus or miss expected ones. |\n| `hasPermission()` kode arguments | Cross-reference every kode string against `config\u002Fpermissions.php permissions[].kode`. Typo = dead permission. |\n| SDM pages `return false` | If SDM pages are hard-disabled with `return false`, HRD users see no SDM menu even though they have `sdm.*` permissions. |\n| Login page `canAccess()` | Login page must NOT restrict access — it's the entry point. If it returns false, no one can log in. |\n| Hardcoded check vs permission | Grep `in_array.*role` in `app\u002FFilament\u002FPages\u002F` and `in_array.*role` in custom `canAccess()` methods. Every hit is a bypass candidate. |\n\n**Audit command:**\n```bash\n# Compare DeptAccessService against config permissions\ngrep -oP \"'\\K[^']+(?='\\s*=>\\s*\\[)\" app\u002FServices\u002FDeptAccessService.php | sort > \u002Ftmp\u002Fdept_slugs.txt\ngrep -oP \"'kode'\\s*=>\\s*'\\K[^']+\" config\u002Fpermissions.php | sort > \u002Ftmp\u002Fperm_kodes.txt\ndiff \u002Ftmp\u002Fdept_slugs.txt \u002Ftmp\u002Fperm_kodes.txt 2>\u002Fdev\u002Fnull || echo \"Compare manually\"\n\n# Find hardcoded role checks\ngrep -rn \"in_array.*role\\|auth()->user()->role\" app\u002FFilament\u002F 2>\u002Fdev\u002Fnull\n```\n\n**Common RBAC audit findings:**\n- Permission name mismatch between config and canAccess() call (e.g. `smart_pricing.view` vs `penawaran.smart_pricing.view`)\n- DeptAccessService allows roles that config role_map denies, or vice versa\n- SDM pages all `return false` — HRD users see 0 SDM menus despite having all `sdm.*` permissions\n- Hardcoded `role === 'R00'` locks pages permanently to Super Admin only (e.g. CompanySettingPage, WorkflowDetailPage)\n- Config permissions exist for a modul but ALL Filament pages\u002Fresources for that modul are disabled or return false\n\n### 4. Traits — shared behavior\n\n| Check | What to look for |\n|-------|-----------------|\n| All methods actually called? | Grep for each method name across project |\n| Dead stubs | `return true;` without logic, empty methods |\n| Namespace correctness | Exceptions\u002Fclasses referenced in traits |\n| `bootTraitName()` | Static boot methods in Eloquent traits fire correctly? |\n\n### 5. Config, Exceptions & Commands — sources of truth\n\n| Check | What to look for |\n|-------|-----------------|\n| Config vs hardcoded | Are business rules (PPN, limits, paths) in config files? |\n| `env()` in config only | `env()` called outside `config\u002F*.php` won't cache properly |\n| Exception handler | Proper rendering per environment, logging level |\n| Environment-specific paths | Hardcoded `C:\u002Flaragon\u002F...` or `C:\u002Fxampp\u002F...` in Services? |\n| Console commands | Schedule correctness, error handling, output formatting |\n| **Command model references** | Every `\\App\\Models\\Xxx` referenced in `app\u002FConsole\u002FCommands\u002F*.php` must be a real class. Grep `class Xxx` under `app\u002FModels\u002F` to verify |\n| **Command mass-assignment match** | Direct `Model::create(...)` or `Model::update(...)` in Commands may pass columns not in `$fillable`. Always read the target model's `$fillable` array and compare. Silent discard = invisible data loss |\n| **Serial number generation** | `while(...->exists())` loops with increment must rebuild the query inside the loop, not reference a stale Builder from outside |\n\n### 6. Filament Widgets — dashboard data layer\n\n| Check | What to look for |\n|-------|-----------------|\n| Column name correctness | `DATE_FORMAT(tanggal, ...)` — verify column exists in the table's migration\u002FSchema |\n| Cross-widget consistency | Same metric (e.g. pengeluaran per bulan) computed the same way across all dashboard files |\n| N+1 via closures | Widgets that call `Model::count()` inside loops or per-item callbacks |\n| Empty-state guard | `array_keys($data) ?: ['Belum Ada Data']` — silent 0\u002Fempty chart fallback |\n\n---\n\n## Common Bug Patterns Reference\n\n| Pattern | Likely Cause | Grep \u002F Search |\n|---------|-------------|---------------|\n| `\\ValidationException` fatal | Wrong namespace (no `\\Illuminate\\Validation\\` prefix) | `throw new \\\\V` in traits |\n| PPN hardcoded | Config not consulted | `0.11`, `0.12`, `'PPN (11%)'` |\n| `visible()` condition + Livewire state toggle | Section\u002Faction hidden after user triggers action that sets state var (`!$this->previewData`) | `visible.*\\$this->` in Pages\u002F (check for negative state checks) |\n| N+1 helperText | Per-render DB query in form `helperText()` closure — fires every Livewire re-render | `helperText.*::(find\\|where\\|cari\\|search)` in Resources\u002FPages |\n| Real-time `live()` on inputs | 1 server request per keystroke for formatting\u002Fvalidation | `->live()` in form schema (should be `->live(onBlur: true)`) |\n| Batch update bypassing Eloquent events | `Model::where(...)->update(...)` in commands\u002Fcontrollers doesn't fire `updated` event | `->where\\(.*\\)->update\\(` (not on `$model` instance) |\n| Duplicate sync logic | Model `boot()` event + RelationManager `after()` both do same status sync → double processing | `boot.*saved` AND `after` in same feature area |\n| N+1 matching loop | Service calls DB query per item in loop (e.g. `matchToSparepart()` inside `foreach`) instead of preloading + in-memory match | `::find\\|::where\\|->first()` inside `foreach` in Services\u002F |\n| `saveAll()` before single-purpose op | Page calls full save (delete+reinsert+recalc) before kirim\u002Fexport when only 1-2 fields need sync | `saveAll()` called before `kirim\\|generate\\|export` in Pages\u002F |\n| Role bypass in canAccess | RBAC not centralized | `in_array.*->role` in Resources |\n| Dead trait stub | Abandoned refactor | `return true;` in trait methods |\n| Windows-only paths | Hardcoded in Services | `C:\u002F` in files under `app\u002F` |\n| `Auth::` without import | Copied code, facade removed | `Auth::` without `use ...Facades\\Auth` |\n| Infinite event loop | Missing `wasChanged()` gate | `static::updated` without `wasChanged` |\n| Infinite loop in code number gen | `$existsQuery` built ONCE outside while, `$nomor` incremented inside but query never rebuilt | `while.*->exists()` in Traits |\n| Wrong class name in CLI command | Copied from different project\u002Fpackage, model class doesn't exist | `\\\\App\\\\Models\\\\` in `Commands\u002F` |\n| Widget column name mismatch | Different widgets query same table with different column names (e.g. `tanggal` vs `tanggal_pengeluaran`) | `DATE_FORMAT\\(` in `Filament\u002FWidgets\u002F` |\n| Formula logic inversion | Subset treated as independent count (e.g. `approved \u002F (approved + lateApproved)` when late is subset of approved) | `\u002F \\(.* \\+ .*\\)` in reporting\u002Fcontrollers |\n| Invalid status string | Status constant doesn't exist in model | Chain: find `->where('status',` → grep model for constant\u002Fvalid values |\n| Default-allow security | Unknown slugs return `true` in access service instead of `false` | `return true` in DeptAccess\u002FServices |\n| **Partial fix syndrome** | Class name corrected but `::create()` still passes wrong column names (ActivityLog `caused_by`\u002F`properties`\u002F`log_name` after `Activity`→`ActivityLog` fix) | `::create\\\\(\\\\[` near `ActivityLog` in Commands — compare each key against model `$fillable` |\n| **Integer cast missing** | `stok`, `safety_stock`, `reorder_point` not cast to `integer` in model — string comparison breaks `\u003C=` logic | Check `casts()` for `'stok' => 'integer'` in model files with numeric inventory\u002Fquantity fields |\n| **Null safety on date accessor** | `$this->tanggal_penawaran->copy()->addDays(...)` crashes if date field is null | `->.*copy\\\\(\\\\)\\|->.*addDays\\\\(` on date casts in Accessors — check null guard |\n| **Hardcoded role check in Pages** | Custom Filament Pages use `in_array(Auth::user()->role, ['R00', ...])` instead of `hasPermission()`, bypassing DB permission system | `in_array\\\\\\\\(.*->role` in `app\u002FFilament\u002FPages\u002F` — every hit is a bypass candidate |\n| **Nilai efektif progres** | `hitungProgresOtomatis()` \u002F `WorkflowIndicatorService::calculate()` uses `$this->nilai` (initial) instead of `$this->nilai_efektif` (including adendum) — progres overstates completion | `hitungProgresOtomatis()` in Kontrak model, `WorkflowIndicatorService::calculate()` — check which `nilai` is referenced |\n| **Duplicate workflow systems** | Two independent workflow implementations: pipeline (7-stage from contracts) + WorkflowProyek\u002FWorkflowStep\u002FWorkflowTahapan models — causes user confusion & inconsistent progress | Search for both `WorkflowIndicatorService` AND `WorkflowProyek`\u002F`WorkflowStep`\u002F`WorkflowTahapan` models. If both exist, consolidate to one. |\n| **Missing overdue detection** | Contracts past `tgl_akhir` with status `active`\u002F`berjalan` not flagged — no visual\u002Fautomated alert | Check if service computing progress also checks `tgl_akhir \u003C now()` for active contracts |\n| **Professional pipeline UI pattern** | Raw circles + labels → needs: status badge, gradient progress bar, animated active\u002Foverdue nodes, legend with counts | `resources\u002Fviews\u002Fcomponents\u002Fworkflow-indicator.blade.php` — reference for future Filament ERP pipeline displays |\n| **RBAC dual-system drift** | `DeptAccessService::NAV_ACCESS` hardcoded array and `config\u002Fpermissions.role_map` define different access for same module — two sources of truth silently disagree | Compare `DeptAccessService.php` `NAV_ACCESS` keys against `config\u002Fpermissions.php` `role_map` |\n| **Permission name mistmatch** | `hasPermission('penawaran.smart_pricing.view')` in code vs `smart_pricing.view` in config — $permissionKode not found in DB → false for all non-R00 users | `hasPermission\\\\(` — cross-reference each kode against `config\u002Fpermissions.php` `kode` array |\n\n---\n\n## Patch Tool Pitfall — PHP Backslash Namespaces\n\nWhen editing PHP files that contain namespace separators like\n`\\Illuminate\\Validation\\`, the `patch` tool may **double the backslashes**\n(`\\\\` → `\\\\\\\\`), producing syntax errors.\n\n**Fix:** Use `write_file` to rewrite the entire file instead of `patch`.\nOr use `patch` on only the non-backslash portions (e.g. variable names,\nmethod bodies) and check syntax with `php -l \u003Cfile>` after each edit.\nIf the patch tool mangles backslashes, immediately switch to `write_file`.\n\n---\n\n## Verification After Fixing\n\nEvery file you modify MUST pass syntax check:\n\n```bash\ncd \u002Fpath\u002Fto\u002Fproject && php -l app\u002FPath\u002FTo\u002FFile.php\n```\n\nVerify config-driven values are actually read:\n```bash\ngrep -r \"config('pajak.tarif\" app\u002F\n```\n\n## Runtime Recovery — Empty DB \u002F Login Failure\n\n**Symptom:** User can't login (\"superadmin tidak bisa masuk\"), login rejects valid credentials, or app shows zero data everywhere.\n\n**First check — is the DB empty?** Migrations present but 0 rows = DB wiped (`migrate:fresh` without seed, or manual drop). This is NOT a code bug — do not start auditing auth logic.\n\n```bash\nphp artisan tinker --execute=\"dump(DB::table('users')->count()); dump(Schema::hasTable('users'));\"\n# count=0 + hasTable=true → DB wiped\n```\n\nQuick full-DB emptiness probe (all-zero table_rows = fresh DB):\n```bash\n\"C:\u002Flaragon\u002Fbin\u002Fmysql\u002Fmysql-8.0.30-winx64\u002Fbin\u002Fmysql.exe\" -h127.0.0.1 -uroot \\\n  -e \"SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema='aplikasi_kantor' ORDER BY table_rows DESC LIMIT 12;\"\n```\n\n**Pitfall: `mysql` is NOT on git-bash PATH.** Use full Laragon bin path — version dir varies (`ls \"C:\u002Flaragon\u002Fbin\u002Fmysql\u002F\"` to find it).\n\n**Recovery:**\n1. Restore full backup from project root:\n   `\"C:\u002Flaragon\u002Fbin\u002Fmysql\u002Fmysql-8.0.30-winx64\u002Fbin\u002Fmysql.exe\" -h127.0.0.1 -uroot aplikasi_kantor \u003C aplikasi_kantor_backup.sql`\n   (full dump incl. users table; ~33 INSERTs. Verify: `SELECT id,username,role FROM users;` — superadmin id=1, role R00)\n2. Reset superadmin password (user standard = `password123`):\n   `php artisan tinker --execute=\"App\\Models\\User::where('username','superadmin')->update(['password'=>bcrypt('password123')]);\"`\n3. Verify login: `php artisan tinker --execute=\"dump(Auth::attempt(['username'=>'superadmin','password'=>'password123']));\"` → `true`\n\n## Workflow Chain Test Order (Imperative — User Preference, ERP-specific)\n\n**NEVER test features in isolation.** The material\u002Ffinancial flow MUST be tested in its complete chain order — skipping stages produces invalid results and hides inter-stage data bugs. This is an explicit user preference from 2026-07-29.\n\n### Primary Chain: Kontrak → Sparepart → Finance\n\nCorrect order for any ERP test simulation involving sparepart\u002Fproject workflow:\n```\nKONTRAK\n  ↓\nRAB (Insert items — harga satuan dari file import)\n  ↓\nBOM (Bill of Materials — auto-generate via RabMaterialPlanService::generateFromRab)\n  ↓\nAktivasi BOM oleh Gudang (R04 — via RabMaterialPlanService::activate)\n  ↓\nPekerjaan (dibuat oleh Admin, dikerjakan oleh Teknisi R02)\n  ↓\nTransaksi Keluar (sparepart terpakai, auto-decrement stok, auto-sync BOM realisasi)\n  ↓\nFaktur (tagih berdasarkan transaksi keluar + PPN config-driven 12%)\n  ↓\nPembayaran (auto-update faktur→lunas via Pembayaran::booted()::saved())\n```\n\n**Why chain order matters:**\n- RAB is the BASIS for BOM — tanpa RAB, gudang tidak punya acuan\n- BOM is the BASIS for sparepart mapping — tanpa sparepart_id, TransaksiKeluar tidak bisa diproses\n- Transaksi Keluar is the BASIS for invoicing — tanpa transaksi keluar, faktur tidak punya dasar\n- User is learning the logic — test urut agar alur kerja divisi bisa dipantau\n- Workflow proyek harus BERURUTAN agar role progres teratur\n\n**Pitfall:** Previous sessions skipped RAB→BOM→Mapping→TransaksiKeluar and jumped straight to Faktur→Pembayaran. This was explicitly CORRECTED by the user (2026-07-29). Do NOT repeat — always run the full chain.\n\n**Two complementary sequences exist:** Role-based sequence (who does what) lives in the project's RULES.md \u002F erp-rules skill. This section defines the data flow order (what order data must travel). Both must be followed; they are not alternatives.\n\n### Running Multi-Step Scripts\n\nWrite a `.php` file, then run via tinker (not direct `php`):\n```bash\nphp artisan tinker --execute=\"require '_workflow_test.php'\"\n```\nScript must include proper `use` imports. Auth is needed before calling services that check `Auth::id()`.\n\nKey service calls in order:\n```php\n\u002F\u002F Step 1-2: RAB → BOM\n$plan = app(RabMaterialPlanService::class)->generateFromRab($rab);\n\n\u002F\u002F Step 3: Aktivasi BOM oleh Gudang\nAuth::loginUsingId($gudangUser->id); \u002F\u002F must be role R04\napp(RabMaterialPlanService::class)->activate($plan);\n\n\u002F\u002F Step 4-5: Pekerjaan → TransaksiKeluar (stok auto-decrement via booted)\n$pekerjaan = Pekerjaan::create(['kontrak_id' => $id, 'user_id' => $teknisi->id, 'status' => 'approved', ...]);\nTransaksiKeluar::create([\n    'sparepart_id' => $sparepartId,\n    'quantity' => $qty,\n    'pekerjaan_id' => $pekerjaan->id,\n    'teknisi_id' => $teknisi->id,\n    'harga_jual' => $hargaJual,\n    'status_tagih' => 'belum_tertagih',\n    'tipe' => 'keluar',\n]);\n\n\u002F\u002F Step 6: Faktur (direct terbit, skip draft)\n$faktur = Faktur::create([\n    'kontrak_id' => $id,\n    'subtotal' => $total, 'ppn' => round($total * 0.12), 'total_tagihan' => $total + $ppn,\n    'status' => 'terbit',\n]);\n\n\u002F\u002F Step 7: Pembayaran → auto-lunas\nPembayaran::create(['faktur_id' => $faktur->id, 'jumlah' => $totalTagihan, ...]);\n```\n\n### Auto-Create Sparepart from Unmapped BOM Items\n\nWhen BOM has items without `sparepart_id` (no matching sparepart in DB), batch-create sparepart from unique item names:\n\n```php\n$unmapped = RabMaterialPlanItem::where('plan_id', $planId)\n    ->whereNull('sparepart_id')->where('tipe_item', '!=', 'jasa')->get();\n\n$uniqueItems = $unmapped->groupBy('uraian_item'); \u002F\u002F dedup by name\n\nforeach ($uniqueItems as $uraian => $items) {\n    $existing = Sparepart::whereRaw('LOWER(TRIM(nama_part)) = ?', [trim(mb_strtolower($uraian))])->first();\n    if ($existing) {\n        foreach ($items as $item) $item->update(['sparepart_id' => $existing->id]);\n        continue;\n    }\n    $sp = Sparepart::create([\n        'sku' => 'SP-' . str_pad(++$lastSkuId, 5, '0', STR_PAD_LEFT),\n        'nama_part' => $uraian,\n        'kategori' => 'PROYEK', \u002F\u002F REQUIRED — no DB default!\n        'stok' => 1000,\n        'harga' => $first->harga_satuan_rab,\n        'harga_jual' => $first->harga_satuan_rab,\n    ]);\n    foreach ($items as $item) $item->update(['sparepart_id' => $sp->id, 'tipe_item' => 'sparepart']);\n}\n```\n\n**Pitfalls specific to the sparepart chain:**\n- **Sparepart `kategori` field has NO default value** — `Sparepart::create()` without `'kategori'` throws SQL error 1364. Always include kategori.\n- **TransaksiKeluar auto-decrements stok via booted()** — `TransaksiKeluar::booted()::created()` calls `decrementStok()` automatically. Do NOT manually `$sp->decrement('stok', ...)` after creating record — that double-deducts.\n- **RAB must have kontrak_id** — orphan RABs (kontrak_id=NULL) cannot be reached by `syncFromTransaksiKeluar()` which traverses `pekerjaan→kontrak→RAB→BOM`.\n- **BOM fuzzy mapping is approximate** — when only 5 sparepart exist, 518-item RAB maps only ~81 items, many wrong. Use auto-create-sparepart approach for production data.\n\n---\n\n## Pitfalls\n\n- **Patch tool + PHP namespaces** — see note above\n- **Layer skipping** — don't jump to config before checking models; a model bug\n  makes service\u002Fresource changes pointless\n- **Over-auditing** — focus on CRITICAL\u002FHIGH findings first (namespace errors,\n  security bypasses, config mismatches). Present lower-severity items as notes\n- **Reading too many files** — sample strategically: 1-2 models, 1-2 services,\n  1-2 resources, then the traits and config. Don't read 500 files\n- **False urgency** — the user wants quality findings, not speed. Validate\n  each finding before reporting\n- **Language mismatch** — user may describe bugs in Bahasa Indonesia but code\n  is in English; report findings in the language the user initiated\n- **Command $fillable mismatch** — when a CLI command calls `Model::create([...])` directly (not through a service\u002Fstatic method), cross-reference every key against the model's `$fillable` array. Silent mass-assignment discard = invisible data loss. The `created`\u002F`updated` event still fires, so bugs hide at the database layer\n- **Sparepart numeric fields** — `stok`, `safety_stock`, `reorder_point` etc. must be cast to `integer`. Without cast, PHP `\u003C=` becomes string comparison (`\"9\" \u003C= \"10\"` = false). Check `casts()` for `'integer'` on all numeric inventory\u002Fquantity fields\n- **Date accessor null crash** — `$this->date_field->copy()->addDays(...)` throws FatalError if date_field is nullable and null. Always guard with `$this->date_field ? $this->date_field->copy()... : null`\n- **Hardcoded role checks in custom Pages** — all Filament Resources may use `hasPermission()`, but custom Pages (standalone `Filament\\\\Pages\\\\Page`) often use `in_array(role, [...])`. After auditing Resources, grep `app\u002FFilament\u002FPages\u002F` for `in_array.*role`\n- **RBAC dual system drift** — when auditing access control, ALWAYS check both `config\u002Fpermissions.role_map` AND `DeptAccessService::NAV_ACCESS`. They are independent systems. A role can have permission via config but still be denied by DeptAccessService, or vice versa. Grep both. Cross-reference.\n- **Permission name prefix mismatch** — `hasPermission('penawaran.smart_pricing.view')` vs config `smart_pricing.view` (no `penawaran.` prefix). Always cross-reference the exact kode string in `config\u002Fpermissions.php permissions[].kode`.\n- **Duplicate workflow systems** — check for both `WorkflowIndicatorService` (pipeline 7-stage from contracts) AND `WorkflowProyek`\u002F`WorkflowStep`\u002F`WorkflowTahapan` models. If both exist, consolidate to one. User confusion & inconsistent progress reporting. See `references\u002Fworkflow-monitoring-redesign-20260729.md`.\n- **Missing overdue detection** — contracts past `tgl_akhir` with status `active`\u002F`berjalan` not flagged — no visual\u002Fautomated alert. Check if progress service also checks `tgl_akhir \u003C now()` for active contracts.\n- **Professional pipeline UI pattern** — raw circles + labels → needs: status badge, gradient progress bar, animated active\u002Foverdue nodes, legend with counts. See `resources\u002Fviews\u002Fcomponents\u002Fworkflow-indicator.blade.php` — reference for future Filament ERP pipeline displays.\n- **KontrakResource View page** — embed pipeline indicator using `ViewEntry::make('pipeline')->view('filament.resources.kontrak-resource.partials.pipeline-indicator')` with `getStateUsing(fn() => ...)` for dynamic stage data from `WorkflowIndicatorService::calculate($record)`. Use `Placeholder` components only for static summary cards; for dynamic calculated values use `TextEntry::make('...')->getStateUsing(fn() => ...)`.\n- **Cleanup orphan systems** — when removing duplicate models (e.g. WorkflowProyek), also remove: Resource, Pages, Widgets, Migrations, and verify no FK references remain in other models (e.g. WorkflowLog::tahapan()).\n- **Permission name prefix mismatch** — `hasPermission('penawaran.smart_pricing.view')` vs config `smart_pricing.view` (no `penawaran.` prefix). Always cross-reference the exact kode string in `config\u002Fpermissions.php permissions[].kode`.\n\n---\n\n## Real-World References\n\nSession-specific audit logs live under `references\u002F` in this skill directory:\n\n| File | Session | Focus |\n|------|---------|-------|\n| `references\u002Ferp-audit-example.md` | 2026-07-28 | Batch 1: Models, Services, Resources, Traits, Config |\n| `references\u002Ferp-audit-batch3.md` | 2026-07-29 | Batch 3: Traits, Commands, Widgets, Controllers, Security |\n| `references\u002Ferp-audit-batch4.md` | 2026-07-29 | Batch 4: Workflow chain audit, RAB import fix, performance, login override |\n| `references\u002Ferp-audit-batch5.md` | 2026-07-29 | Batch 5: Full re-audit — 81 models, 21 services, 31 resources, bugs found: ActivityLog columns, role bypass, Sparepart casts, date null safety |\n| `references\u002Ferp-audit-rbac.md` | 2026-07-29 | RBAC audit: menu-per-role analysis, DeptAccessService vs config drift, 4 hardcoded role checks, HargaReferensi permission mismatch |\n| `references\u002Ferp-cipali-production-setup-20260730.md` | 2026-07-30 | CIPALI production: orphan RAB 518 item → kontrak → BOM → auto-create 162 sparepart → aktivasi gudang. Code patterns + error traces |\n\nLoad with `skill_view(name='laravel-code-audit', file_path='references\u002F\u003Cfile>')`.\n\n## Reusable Test Script\n\nA reusable workflow-chain verification script (`scripts\u002Ftest-workflow-chain.php`)\nverifies Klien → Kontrak → Termin → Pekerjaan → Faktur → Pembayaran → Aset\nauto-cascade events. Copied to project `scripts\u002F` dir and run from project root:\n\n```bash\nphp scripts\u002Ftest-workflow-chain.php\nphp scripts\u002Ftest-workflow-chain.php --with-jatuh-tempo  # includes overdue + partial pay\nphp scripts\u002Ftest-workflow-chain.php --with-adendum      # includes contract revision\nphp scripts\u002Ftest-workflow-chain.php --keep              # keep test data\n```\n\nThe script creates test data, runs all workflow steps, auto-cleans on exit.\nReturns exit code 0 on all-pass, 1 on any failure.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":38,"description":7},"Hermes Agent","1.0.0",{"hermes":27},{"tags":28,"related_skills":35},[29,30,31,32,33,34],"laravel","audit","code-review","architecture","php","filament",[36,37],"requesting-code-review","systematic-debugging",[39,40,41],"linux","macos","windows","main","96bab5c1e3ed763a77711f59b371e678af30971d","skills\u002Fsoftware-development\u002Flaravel-code-audit","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI","https:\u002F\u002Fgithub.com\u002F12103541","2026-08-04 09:54:44",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add 12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI --skill laravel-code-audit",{"tool":54,"command":55},"bunx","bunx skills add 12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI --skill laravel-code-audit",{"tool":57,"command":58},"pnpm","pnpm dlx skills add 12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI --skill laravel-code-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002FSKILL.md",true,[62,68,72,76,80,84,88,92,96,100,104],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Ferp-audit-batch3.md","REFERENCE","参考文档",5253,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-batch3.md",{"path":69,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Ferp-audit-batch4.md",7324,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-batch4.md",{"path":73,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Ferp-audit-batch5.md",6328,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-batch5.md",{"path":77,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Ferp-audit-example.md",6724,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-example.md",{"path":81,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Ferp-audit-rbac-fixes-20260729.md",3932,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-rbac-fixes-20260729.md",{"path":85,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Ferp-audit-rbac.md",3268,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-audit-rbac.md",{"path":89,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Ferp-cipali-production-setup-20260730.md",2727,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Ferp-cipali-production-setup-20260730.md",{"path":93,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fkontrak-view-redesign-20260729.md",4397,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Fkontrak-view-redesign-20260729.md",{"path":97,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Flitellm-ai-gateway-integration.md",5188,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Flitellm-ai-gateway-integration.md",{"path":101,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fworkflow-monitoring-redesign-20260729.md",3857,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Freferences\u002Fworkflow-monitoring-redesign-20260729.md",{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Ftest-workflow-chain.php","SCRIPT","脚本",14459,"https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Flaravel-code-audit\u002Fscripts\u002Ftest-workflow-chain.php",[111,118,124,131,138,144],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7A39S6PZQ8P0NYNNW6BDC8V","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":119,"name":37,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M7A39MWGGFPJ2VXT2EJD8JAD","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fsystematic-debugging\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":19},"01M7A39J23RCZQ6JS773JX0CT6","spike","Throwaway experiments to validate an idea before build.","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fspike\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":19},"01M7A39FQNTYVFXDGTCGY9HSTT","simplify-code","Parallel 4-agent cleanup of recent code changes.","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fsimplify-code\u002FSKILL.md",[],[],{"skillNo":139,"name":36,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":19},"01M7A39CRM98DQ8K3B89MYBWVN","Pre-commit review: security scan, quality gates, auto-fix.","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Frequesting-code-review\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":19},"01M7A398Q7J4YEFPWVZBXMW769","python-debugpy","Debug Python: pdb REPL + debugpy remote (DAP).","https:\u002F\u002Fgithub.com\u002F12103541\u002FBACKUP-SKILLS-TOOLS-MCP-MEMORI\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fpython-debugpy\u002FSKILL.md",[],[]]