/la:pr-implementfrom la
Stage 3 of the /la:pr flow: implements code changes until all tests pass, then commits, pushes, and opens a PR with user approval. Requires prior /la:pr context.
Ships in la. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Stage 3 of 4 of the /la:pr flow. Prerequisite: /la:pr has run in this
session, preflight included, and established BRANCH, CHANGE_ID, OPENSPEC, and the full tracker
issue (body + comments), if there is one. If any of that is missing, invoke the la:pr skill
instead — it rehydrates and dispatches back here. The /la:pr stopping policy
applies throughout this stage.
Before writing anything, recover the durable plan (the
openspec/changes/<CHANGE_ID>/ folder when OPENSPEC=1, else the plan
comment on the tracker issue) and the failing tests already on disk from
pr-tests.
Implement the plan. After changes, run the tests in the /la:pr local test scope and fix any failures. Do not
declare done until every test from the pr-tests stage passes.
An existing test that breaks because it pins what the plan changes is not a
design fork: ask only for approval to align it with the plan (the /la:pr
stopping policy), never with alternative options.
Symptom vs. structural cause — decide before you patch. The plan already
chose between a band-aid and a structural fix; implement the structural shape
it chose, and do not quietly degrade it into instance patches to get tests
green faster. If, while implementing, a test failure or the code itself
reveals that the planned fix is a band-aid after all — the same change must be
repeated in N places, two code paths have to agree by hand, a missed
normalization that a single canonical representation would obviate, an
axiom-violating shape left standing (judged against the principles/axioms in
the architecture/*.arc42.md files) — STOP and present the case to me: the
symptom, the structural cause, the band-aid vs. structural options with
PROS/CONS, the arc42 grounding, and your RECOMMENDATION (leaning structural —
a bigger diff is an acceptable cost). Wait for my call (this is the
design-decision pause permitted by the /la:pr stopping policy). If the
failure is genuinely local with no structural cause, just fix it. Never
silently ship a band-aid over a structural problem, and never undertake a
large structural refactor the plan did not include without my go-ahead.
Intermediate local commits during implementation are fine within reason — e.g.
to merge origin/main before editing, or to checkpoint a coherent working state.
Keep them tidy (specific git add, never git add -A); they can be reorganized
before the push. The go-ahead gate in Step 3 governs opening the PR only.
If OPENSPEC=1, tick off openspec/changes/<CHANGE_ID>/tasks.md as you complete
each task (the same checklist authored in pr-plan — this is the
apply phase, driven by TDD here instead of /opsx:apply).
When writing code, follow the la:concise-comments skill: no design essays,
ticket-ID-on-every-line, or code-restating comments; docstrings to a line.
Rationale belongs in the spec / PR description / the tracker issue — not in
code — so verbose comments never get written in the first place.
Once the tests in scope are green, run the SAME deterministic gates pr-review uses, so
the review bots don't have to redo them and the first push is already clean.
Both are HARD GATES: do not proceed to Step 3 while either is RED.
Conventions. There is no PR yet at this stage, so diff against the default
branch with --base:
la-check-conventions --base <default-branch>
What it checks and how to fix each finding is described once, in the
la:process-reviews skill (its conventions gate section); follow it. An
import-not-top waiver must be confirmed with me BEFORE landing it. Re-run
until green.
Type check. Run dr-typecheck. It checks each applicable language against
its committed baseline, and exit 1 means this change added errors outside it.
The baseline is a ratchet:
--write-baseline exists only to adopt the gate once);la-config get lang.<language>.suppression) is a solve only when the checker is wrong (a false
positive) or the wrongness is deliberate (e.g. an invalid-input test);dr-typecheck shrinks.dr-typecheck printing "nothing to check" means no language applies, which is
not a failure. Re-run until green.
Once every test in scope passes AND both local gates are green, push the branch,
then stop and ask me whether to open a PR (folding in any final commit of the
implementation). Intermediate local commits along the way were fine (Step 1);
push the branch when ready, but opening the PR needs my explicit go-ahead —
never do it on your own.
Then follow the standard commit/PR workflow (specific git add for each new
file, never git add -A).
If OPENSPEC=1, the whole openspec/changes/<CHANGE_ID>/ folder is part of the
change — git add it explicitly alongside the code (proposal, design, tasks,
delta specs). Do NOT archive yet — that happens once the review loop has
converged, just before I merge (pr-review).
Always merge the PR's destination branch before creating the PR. After
committing and before the push, bring the PR's envisioned base branch (the branch
the PR will target — usually main) into BRANCH, so the PR opens against, and
CI runs on, the current destination rather than a stale base: `git fetch origin
Write the PR description for a human reader, not as a spec dump. Concise but
complete prose: what the change does and why, the user-facing behaviour it adds
or changes, and — where it makes the change concrete — a short runnable example
or two (a query plus what it now returns, or a before/after). Cover anything a
reviewer needs to understand and evaluate the change; skip what they don't.
Do NOT paste openspec show --diff, the raw delta specs, or the tasks
checklist — the change folder is committed in this PR, so whoever wants the full
spec surface reads it there. Link the tracker issue (GitHub: Closes #<N>).
🛑 HARD STOP (reset point 3 of 3) — just after the PR is created. Code, tests (green, local gates clean), and the change folder are committed and the PR exists. Say we're at reset point 3 and STOP — do not start the review loop. I'll
/clearand re-invoke/la:pr, which will detect and runpr-review.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub motleyai/living-architecture --plugin la16 skills in this plugin
/arch-cleanupUse to carve or tighten ONE architecture boundary in a repo with the living-architecture setup — take a coherent batch of grandfathered `#legacy` arrows (or extract a new node), refactor them away with verified moves (deterministic-refactor), and shrink the legacy-arrow baseline monotonically. Behaviour-preserving by definition; one slice = one branch/PR./arch-initBuild a repo's first living-architecture model — write the language sections of architecture/index.yaml, scaffold the as-is model from the measured imports (la-arch-scaffold), choose the wedge with the user, draft the principles from the repo's own instructions, map the specs, and get la-arch-check green. Syntax and maintenance are in the la:living-architecture reference./codex-reviewUse the codex MCP server to review the current git diff. Focus on correctness, regressions, security issues, tests, and maintainability. Return only actionable findings with file/line references and severity. Do not modify files./concise-commentsRules for concise code comments/docstrings, plus a pass to trim verbose ones. Use when writing or reviewing code, or when asked to reduce comment verbosity / trim over-commented code / cut docstring bloat. Referenced by /la:pr and /la:process-reviews./fetch-coderabbit-threadsUse when the user asks to fetch / list / read / show unresolved CodeRabbit review threads on a GitHub PR. Pulls thread URL, file:line, author, and full comment body for every thread CodeRabbit opened that is not yet resolved, plus CodeRabbit's review-summary nitpicks./fetch-failed-pr-checksUse when the user asks to check / fetch / list / show failed CI checks (GitHub Actions, external CI) on a GitHub PR — including details/logs of the failures. Pulls the statusCheckRollup, filters to non-passing terminal states, and (for GitHub Actions runs) appends a log excerpt, or why there is none.Other plugins' skills for the same job