{"slug":"pr-implement","title":"pr-implement","summary":"Stage 3 of 4 of the /la:pr flow — implement until every test from the pr-tests stage passes, then commit, push and, with the user's explicit go-ahead, open the PR. Normally dispatched by /la:pr; if the /la:pr context (BRANCH, CHANGE_ID, OPENSPEC, tracker issue) is not already loa","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:44:00.107734Z","repo":{"url":"https://github.com/MotleyAI/living-architecture","stars":16,"forks":2,"license":"MIT","updatedAt":"2026-11-27T11:19:06Z"},"bodyHtml":"<hr>\n<h2>name: pr-implement\ndescription: Stage 3 of 4 of the /la:pr flow — implement until every test from the pr-tests stage passes, then commit, push and, with the user's explicit go-ahead, open the PR. Normally dispatched by /la:pr; if the /la:pr context (BRANCH, CHANGE_ID, OPENSPEC, tracker issue) is not already loaded in this session, invoke the la:pr skill instead.</h2>\n<p><strong>Stage 3 of 4 of the <code>/la:pr</code> flow.</strong> Prerequisite: <code>/la:pr</code> has run in this\nsession, preflight included, and established <code>BRANCH</code>, <code>CHANGE_ID</code>, <code>OPENSPEC</code>, and the full tracker\nissue (body + comments), if there is one. If any of that is missing, invoke the <code>la:pr</code> skill\ninstead — it rehydrates and dispatches back here. The <code>/la:pr</code> stopping policy\napplies throughout this stage.</p>\n<p><strong>Stealth mode</strong> (<code>la-config get stealth</code> prints <code>true</code>): the <code>/la:pr</code> \"Stealth mode\" rules override every step\nbelow that writes to the tracker, writes OpenSpec or la files into the repo, runs an <code>openspec</code> command, commits,\npushes, or puts text in a commit, the PR or a reply.</p>\n<p>Before writing anything, recover the durable plan (the\n<code>openspec/changes/&lt;CHANGE_ID&gt;/</code> folder when <code>OPENSPEC=1</code>, else the plan\ncomment on the tracker issue) and the failing tests already on disk from\n<code>pr-tests</code>.</p>\n<h2>Step 1 — Implement until tests pass</h2>\n<p>Implement the plan. After changes, run the tests in the <code>/la:pr</code> local test scope and fix any failures. Do not\ndeclare done until every test from the <code>pr-tests</code> stage passes.\nAn existing test that breaks because it pins what the plan changes is not a\ndesign fork: ask only for approval to align it with the plan (the <code>/la:pr</code>\nstopping policy), never with alternative options.</p>\n<p><strong>Symptom vs. structural cause — decide before you patch.</strong> The plan already\nchose between a band-aid and a structural fix; implement the structural shape\nit chose, and do not quietly degrade it into instance patches to get tests\ngreen faster. If, while implementing, a test failure or the code itself\nreveals that the planned fix is a band-aid after all — the same change must be\nrepeated in N places, two code paths have to agree by hand, a missed\nnormalization that a single canonical representation would obviate, an\naxiom-violating shape left standing (judged against the principles/axioms in\nthe <code>architecture/*.arc42.md</code> files) — STOP and present the case to me: the\nsymptom, the structural cause, the band-aid vs. structural options with\nPROS/CONS, the arc42 grounding, and your RECOMMENDATION (leaning structural —\na bigger diff is an acceptable cost). Wait for my call (this is the\ndesign-decision pause permitted by the <code>/la:pr</code> stopping policy). If the\nfailure is genuinely local with no structural cause, just fix it. Never\nsilently ship a band-aid over a structural problem, and never undertake a\nlarge structural refactor the plan did not include without my go-ahead.</p>\n<p>Intermediate local commits during implementation are fine within reason — e.g.\nto merge origin/main before editing, or to checkpoint a coherent working state.\nKeep them tidy (specific <code>git add</code>, never <code>git add -A</code>); they can be reorganized\nbefore the push. The go-ahead gate in Step 3 governs <strong>opening the PR</strong> only.</p>\n<p>If <code>OPENSPEC=1</code>, tick off <code>openspec/changes/&lt;CHANGE_ID&gt;/tasks.md</code> as you complete\neach task (the same checklist authored in <code>pr-plan</code> — this is the\n<code>apply</code> phase, driven by TDD here instead of <code>/opsx:apply</code>).</p>\n<p>When writing code, follow the <code>la:concise-comments</code> skill: no design essays,\nticket-ID-on-every-line, or code-restating comments; docstrings to a line.\nRationale belongs in the spec / PR description / the tracker issue — not in\ncode — so verbose comments never get written in the first place.</p>\n<h2>Step 2 — Local gates (before commit)</h2>\n<p>Once the tests in scope are green, run the SAME deterministic gates <code>pr-review</code> uses, so\nthe review bots don't have to redo them and the first push is already clean.\nBoth are HARD GATES: do not proceed to Step 3 while either is RED.</p>\n<p><strong>Conventions.</strong> There is no PR yet at this stage, so diff against the default\nbranch with <code>--base</code>:</p>\n<pre><code>la-check-conventions --base &lt;default-branch&gt;\n</code></pre>\n<p>What it checks and how to fix each finding is described once, in the\n<code>la:process-reviews</code> skill (its conventions gate section); follow it. An\n<code>import-not-top</code> waiver must be confirmed with me BEFORE landing it. Re-run\nuntil green.</p>\n<p><strong>Type check.</strong> Run <code>trmv-typecheck</code>. It checks each applicable language against\nits committed baseline, and exit 1 means this change added errors outside it.\nThe baseline is a ratchet:</p>\n<ul>\n<li>never re-record it (<code>--write-baseline</code> exists only to adopt the gate once);</li>\n<li>fix every new error at its root, never by loosening types or adding a\nsuppression; a per-line suppression with a reason\n(<code>la-config get lang.&lt;language&gt;.suppression</code>) is a solve only when the checker is wrong (a false\npositive) or the wrongness is deliberate (e.g. an invalid-input test);</li>\n<li>it only shrinks: when a file you touch carries baselined errors that\nroot-fix without much churn, fix those too, and commit the baseline\n<code>trmv-typecheck</code> shrinks.</li>\n</ul>\n<p><code>trmv-typecheck</code> printing \"nothing to check\" means no language applies, which is\nnot a failure. Re-run until green.</p>\n<p><strong>Sonar pre-check.</strong> Run <code>mcp__sonarqube__analyze_code_snippet</code> on each changed production source file and fix its findings. If the tool fails or is unavailable, ignore it.</p>\n<h2>Step 3 — Push, then ask me to open the PR</h2>\n<p>Once every test in scope passes AND both local gates are green, push the branch,\nthen stop and ask me whether to open a PR (folding in any final commit of the\nimplementation). Intermediate local commits along the way were fine (Step 1);\npush the branch when ready, but <strong>opening the PR</strong> needs my explicit go-ahead —\nnever do it on your own.\nThen follow the standard commit/PR workflow (specific <code>git add</code> for each new\nfile, never <code>git add -A</code>).</p>\n<p>If <code>OPENSPEC=1</code>, the whole <code>openspec/changes/&lt;CHANGE_ID&gt;/</code> folder is part of the\nchange — <code>git add</code> it explicitly alongside the code (proposal, design, tasks,\ndelta specs). Do NOT archive yet — that happens once the review loop has\nconverged, just before I merge (<code>pr-review</code>).</p>\n<p><strong>Always merge the PR's destination branch before creating the PR.</strong> After\ncommitting and before the push, bring the PR's envisioned base branch (the branch\nthe PR will target — usually <code>main</code>) into <code>BRANCH</code>, so the PR opens against, and\nCI runs on, the current destination rather than a stale base: `git fetch origin</p>\n` then `git merge origin/`. Commit any local changes first, then\nmerge — NEVER stash, NEVER rebase; the merge message's\nfirst line must name the merged ref in single quotes, e.g. `Merge branch\n'origin/main' into ","files":[{"path":"SKILL.md","sizeBytes":8025,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-29T00:46:06.610232Z","sha256":"C994CC009C52D79A4A4FEC18D097E438E178406B1118B391590A6B82133FF4D5","sizeBytes":3775},"review":null,"source":{"repositoryUrl":"https://github.com/MotleyAI/living-architecture","path":"plugin/la/skills/pr-implement","license":"MIT","commit":"c1ecf0af05da41d754e0a83233334edf6cbca797","subtreeSha":"6246C5DD0881120BC267BDA691DD861539D5516E840F4DBC5B8ADAF82F71EB87","lastSyncedAt":"2026-11-29T00:43:57.908191Z"},"reviewedAt":"2026-11-29T00:52:55.789151Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/MotleyAI/living-architecture/tree/main/plugin/la/skills/pr-implement"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install motleyai-living-architecture@llmmart"},{"target":"git","command":"git clone https://github.com/MotleyAI/living-architecture.git"}]}