{"slug":"pr-plan","title":"pr-plan","summary":"Stage 1 of 4 of the /la:pr flow — interview the user to turn the tracker issue + typed brief into a detailed spec, Codex-review the plan, emit the OpenSpec change (OpenSpec repos only), and make the plan durable. Normally dispatched by /la:pr; if the /la:pr context (BRANCH, CHANG","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:44:00.225603Z","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-plan\ndescription: Stage 1 of 4 of the /la:pr flow — interview the user to turn the tracker issue + typed brief into a detailed spec, Codex-review the plan, emit the OpenSpec change (OpenSpec repos only), and make the plan durable. 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 1 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<h2>Step 1 — Combine and interview</h2>\n<p>Treat the tracker issue body + comments AND whatever I typed when invoking\n<code>/la:pr</code> as the combined brief. In case of conflict, what I typed has higher\npriority but ask to be sure.</p>\n<p><strong>Living-architecture repos</strong>: the <code>la:living-architecture</code> skill's \"Working\nunder the architecture\" rules apply before drafting. The plan MUST state which element\nprinciples apply, and any arc42 contradiction is raised as its own interview\npoint. If the change adds a capability, the plan also records where its spec attaches: one element's metadata <code>specs</code>\n(at any depth), or <code>cross_cutting_specs</code> in <code>index.yaml</code> with a <code>touches:</code> list. When an arc42 axiom edit is needed, keep the clause <strong>concise\nand simple</strong> — introduce a named concept (with a one-symbol gloss where it\nhelps, e.g. <code>a.b.a ≡ a</code>) and reference it, rather than spelling the mechanism\nout inline. Present the exact wording for approval before it lands, and prefer\nthe shortest phrasing that stays precise.</p>\n<p>Interview me in detail.\nCover implementation approach, edge cases, gotchas, design choices, tradeoffs, and constraints.\nSkip obvious questions.\nAsk one at a time and build on my answers.</p>\n<p><strong>IMPORTANT — WHENEVER you ask me to make a choice, you MUST give, for the\ndecision, explicit PROS and CONS of each option AND a clear RECOMMENDATION of\nwhich one you'd pick and why. This is non-negotiable. Never present options as\na bare menu. If you use a structured/multiple-choice prompt, spell out the\npros, the cons, and the recommendation inside it — do not rely on a one-line\ndescription to carry them.</strong></p>\n<p><strong>Genuine options only.</strong> Ask only about genuine choices, and offer only\noptions a reasonable person could pick:</p>\n<ul>\n<li><strong>Effort is not a trade-off.</strong> Less work or a smaller diff is never a pro,\nand more work (churn, re-blessed goldens, many call sites, plan edits) is\nnever a con, unless the amount is ridiculously large. An option whose only\nadvantage is less work is a strawman: never offer it.</li>\n<li><strong>No regressions.</strong> Never offer an option that breaks or loses something\nthat works today (a behaviour, a check, an output a golden pins) unless\nthere is a very good reason, stated as its pro.</li>\n</ul>\n<p>When only one option survives, it is not a question: take it, log it as\n<code>(default)</code> and move on. This governs how you form the RECOMMENDATION above,\nand applies at every stage of the flow, not just planning.</p>\n<p><strong>Design bias — structural fix over band-aid.</strong> When the brief is a bug, a\ngap, or an inconsistency, decide BEFORE designing the fix whether the reported\nsymptom is one instance of a deeper structural cause — judged against the\nprinciples/axioms in the <code>architecture/*.arc42.md</code> files (an axiom-violating\nshape left standing, two code paths that must agree by hand, a missed\nnormalization that a single canonical representation would obviate, a check\nrepeated at every call site, etc. are all tells). Prefer a design that makes\nthe whole bug CLASS impossible or hard to recur — at the planner / type /\ncanonical-representation level, one code path instead of N — over patching\nthe instance in the existing repetitive implementation. This is NOT an\ninterview question: decide it and state the symptom, the structural cause and\nthe arc42 grounding in the plan. Never offer an option whose only pro is a\nsmaller diff. Ask only when the structural fix's diff is HUGE — then: do it\nnow / leave it / separate issue. Only if the problem is genuinely local with no\nstructural cause is the local fix the right plan.</p>\n<p>When you think you have enough information, return a detailed, complete spec.\nIn the spec you write, NEVER take shortcuts or make simplifications or\nextensions to the original requirements without asking me about each one first.</p>\n<p>The spec ends with a <strong>decisions log</strong>: one entry per choice made while\nplanning, giving the decision, the options weighed, the one taken and why, and\nwho took it: <code>(user)</code> for a choice I made, <code>(default)</code> for one you took because\nit had an obvious default, <code>(codex)</code> for a Codex finding folded in. Every\nshortcut, simplification or extension I approved is an entry too. Every exact\nwording I approved (an arc42 clause, a skill or finding text) is quoted\nverbatim and tagged <code>(user, approved wording)</code>.</p>\n<h2>Step 2 — Codex review of the plan</h2>\n<p><strong>Codex follows <code>reviewers.codex</code>.</strong> If <code>la-config get reviewers.codex</code> prints <code>false</code>, skip this step. Otherwise, if the Codex MCP server (<code>mcp__codex__codex</code>) is not available, STOP and tell me: this repo requires Codex reviews, so never skip one silently.</p>\n<p>Once I've approved the spec/plan, hand the plan text to the codex MCP server\n(<code>mcp__codex__codex</code>) and ask it to review the plan itself — not a diff —\nfocusing on correctness of approach, missed edge cases, risky design choices,\ntest coverage gaps, and anything that contradicts the tracker issue. Codex\nshould not modify files; it should return actionable findings.</p>\n<p>Bring Codex's findings back to me and discuss them. For each finding, decide\ntogether whether to fold it into the plan, defer it, or reject it. Update the\nwritten spec to reflect the resolved decisions before moving on, and log every\nfinding in the decisions log: folded ones as <code>(codex)</code> entries, rejected ones\nas <code>rejected (codex)</code> with the reason, and deferred ones with the existing\ntracker issue that covers them (search first; a new issue needs my yes).</p>\n<h2>Step 3 — Emit the OpenSpec change (OpenSpec repos only)</h2>\n<p>Skip this whole step unless <code>OPENSPEC=1</code> (set by <code>/la:pr</code>). Turn the approved,\nCodex-resolved plan into an OpenSpec change — but do NOT hand-author the files\nfrom memory. OpenSpec ships authoritative, version-correct, per-artifact\ninstructions; follow them so the output passes <code>validate --strict</code>.</p>\n<ol>\n<li><p><strong>Scaffold:</strong> <code>openspec new change &lt;CHANGE_ID&gt;</code> (creates\n<code>openspec/changes/&lt;CHANGE_ID&gt;/.openspec.yaml</code>; artifacts are added next).</p>\n</li>\n<li><p><strong>Author each artifact in dependency order</strong> — proposal → specs → design →\ntasks. For each, run <code>openspec instructions &lt;artifact&gt; --change &lt;CHANGE_ID&gt;</code>\nand obey the emitted <code>&lt;instruction&gt;</code> + <code>&lt;template&gt;</code>, writing to the <code>&lt;output&gt;</code>\npath it names. <code>openspec status --change &lt;CHANGE_ID&gt;</code> shows what's done/blocked.\nMost of this is a reformat of the plan — don't re-derive it:</p>\n<ul>\n<li><strong>proposal.md</strong> — <code>## Why</code> + <code>## What Changes</code> (from the tracker issue +\nplan), plus <code>## Capabilities</code> (New/Modified — this list decides which delta\nfiles must exist) and <code>## Impact</code>.</li>\n<li><strong>specs/</strong> (the delta — the crux) — one file per\ncapability from the proposal, using <code>## ADDED</code> / <code>## MODIFIED</code> / <code>## REMOVED</code>\n/ <code>## RENAMED Requirements</code>. A <strong>new</strong> capability's file also needs a\n<code>## Purpose</code> (50+ chars) — omit it for an existing capability, else <code>archive</code>\nstamps a <code>TBD</code> placeholder into the corpus. Each requirement is\n<code>### Requirement: &lt;name&gt;</code> in\nSHALL/MUST language with <strong>≥1</strong> <code>#### Scenario:</code> in WHEN/THEN form. Validator\ngotchas: scenarios need <strong>exactly four</strong> <code>#</code> (three or bullets fail\nsilently); MODIFIED must contain the FULL updated requirement; REMOVED needs\n<strong>Reason</strong> + <strong>Migration</strong>; RENAMED uses FROM:/TO:. These scenarios ARE the\nacceptance criteria for the <code>pr-tests</code> stage.</li>\n<li><strong>design.md</strong> — its <code>## Decisions</code> is the decisions log, keeping each\nentry's tag; approved scope cuts also go under Non-Goals. Skip design.md\nonly if the log is empty.</li>\n<li><strong>tasks.md</strong> — the <code>- [ ]</code> checklist that also drives the\n<code>pr-tests</code> and <code>pr-implement</code> stages; maintain it here, not twice.</li>\n</ul>\n</li>\n<li><p><strong>No spec-level behaviour change?</strong> (pure refactor, tooling, docs, or a fix\nthat doesn't alter specified behaviour) — do NOT invent a requirement; set\n<code>skip_specs: true</code> in <code>openspec/changes/&lt;CHANGE_ID&gt;/.openspec.yaml</code>. Specs\ndescribe behaviour, so if behaviour doesn't change, no spec should.</p>\n</li>\n<li><p><strong>Gate before writing any tests:</strong></p>\n<pre><code>openspec validate &lt;CHANGE_ID&gt; --strict\n</code></pre>\n<p>Fix until green. This catches a malformed plan and — crucially — any MODIFIED\nrequirement that no longer lines up with the current corpus (spec drift), at\nplan time, for free.</p>\n</li>\n</ol>\n<h2>Step 4 — Make the plan durable, then hard stop</h2>\n<blockquote>\n<p><strong>\uD83D\uDED1 HARD STOP (reset point 1 of 3) — before tests.</strong> First make the plan\ndurable: if <code>OPENSPEC=1</code> it's the validated change folder; if <code>OPENSPEC=0</code>,\npost the finalized plan, decisions log included, as a comment on the tracker issue (Linear:\n<code>mcp__linear__save_comment</code>; GitHub: <code>gh issue comment &lt;N&gt;</code>) so a reset\nrecovers it. Then say we're at reset point 1 and STOP — do not start writing tests.\nI'll <code>/clear</code> and re-invoke <code>/la:pr</code>, which will detect and run\n<code>pr-tests</code>.</p>\n</blockquote>\n","files":[{"path":"SKILL.md","sizeBytes":9852,"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:07.022792Z","sha256":"956836012ADC7B9AA0CBF630AA084BE13CF38119AA86B76EC11B6363388DD828","sizeBytes":4694},"review":null,"source":{"repositoryUrl":"https://github.com/MotleyAI/living-architecture","path":"plugin/la/skills/pr-plan","license":"MIT","commit":"c1ecf0af05da41d754e0a83233334edf6cbca797","subtreeSha":"5C209640273F5918D24D91A38FF6397B65E089A5F0D40310C770B027F1797B2A","lastSyncedAt":"2026-11-29T00:43:57.908191Z"},"reviewedAt":"2026-11-29T00:52:55.881283Z","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-plan"},{"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"}]}