la plugin
A Claude Code plugin for Python and TypeScript code that agents write: normative principles attached to a LikeC4 architecture model, which also serves as an import whitelist. Enforced by a complete PR workflow that generates OpenSpec changes, whose archives double as ADRs.
How to install the la plugin
Run both commands inside Claude Code. The first adds the marketplace once; the second installs the plugin.
/plugin marketplace add MotleyAI/living-architecture
/plugin install la@living-architectureWhat's inside la
19 parts read from the plugin's own files.
Skills 19
Claude loads it when the task matches- arch-cleanup
Use 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-init
Build 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-review
Use 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-comments
Rules 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.
- deterministic-refactor
Use to rename or move a module/class/function/method/attribute (Python or TypeScript) and update all imports/references, with a deterministic check that nothing was missed. Mutator = dr-refactor; the guarantee = la-typecheck + dr-mock-lint + the test suite. Only sound on a compliant target (see docs/deterministic-refactoring.md).
- fetch-coderabbit-threads
Use 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-checks
Use 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.
- init
Onboard a repo to the la plugin — detect its tracker, test/lint/type-check commands, Codex, Sonar and any existing OpenSpec or architecture setup, propose a complete living-architecture.yaml with a source for every key, ask only what cannot be detected, write the file, then offer the type-check baseline and la:arch-init. Also the fast path other skills run when a repo has no config, and the way to edit or convert an existing config.
- living-architecture
Reference for the living-architecture layer (LikeC4 structure model + arc42 principles + model-truth import enforcement + cross-check): its syntax, the checks, the rules a coding agent follows when it changes code under it, and how to maintain it. Building the first model is la:arch-init; carving a boundary is la:arch-cleanup.
- make-diff-compliant
Use to bring exactly the source files a PR/branch touches up to the deterministic-refactor compliance conditions (typed, overrides marked, typed test doubles), so a future refactor over them is verifiable. Scoped to the diff — grows compliance monotonically, no repo-wide migration.
- make-refactor-target-compliant
Use BEFORE renaming a symbol/attribute (Python or TypeScript) to make its blast radius verifiable — type the code that might reference it (untyped params/vars that could hold the class, classes with matching attribute names, overrides not marked as such) so the post-rename type-check gate is sound.
- openspec-init
Initialize or repair OpenSpec in the current repo for the /la:pr flow. Ensures the openspec CLI is available (global install, npx fallback), scaffolds openspec/ with `openspec init --tools none` (corpus only, no /opsx:* commands), and verifies. Invoked by /la:pr when openspec/ is absent or invalid, or run directly.
- pr
Spec-driven change flow for a task given to an agent. Pulls in the tracker issue (Linear or GitHub, per `living-architecture.yaml`) that the current git branch belongs to, and combines it with whatever the user typed when invoking the skill. Rehydrates context, detects the current stage, and dispatches to the stage skills la:pr-plan → la:pr-tests → la:pr-implement → la:pr-review.
- pr-implement
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.
- pr-plan
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.
- pr-review
Stage 4 of 4 of the /la:pr flow — run /la:process-reviews in a loop until every source is green, then (OpenSpec repos only) archive the change, push, and keep looping on the archived HEAD until every source is green again so the PR can merge. 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.
- pr-tests
Stage 2 of 4 of the /la:pr flow — write the full failing test suite for the agreed plan (TDD-first), then Codex-review the tests against the plan. 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.
- process-reviews
Use when the user asks to process / triage / address / handle PR reviews from CodeRabbit, SonarQube, Codex, and CI all together (CodeRabbit and Sonar only when they ran on the PR). Watches the PR every minute (30 min cap) and triages each new failed CI check, CodeRabbit comment and finished Sonar analysis as it appears, while a Codex review runs concurrently against the local diff. Once everything is terminal, fetches unresolved threads from all three code-review sources plus failed CI checks, validates each against the actual code / log, handles invalid ones in place (reply on thread / NOSONAR comment), and presents a unified plan for fixing the valid ones (split into logical groups if more than 3). Invoked from la:pr-review, it returns the triaged list instead.
- reply-to-pr-thread
Use when the user asks to reply / comment on a CodeRabbit (or any) PR review thread, OR when posting a reasoning/explanation reply tagging @coderabbitai for a thread you've classified as invalid. Wraps `gh api .../pulls/N/comments/<id>/replies`. Body is read from stdin.
Using la in Claude Code
Skills need no command. Claude reads them when your request matches what they describe.
Update, turn off or remove
- Update the plugin (shell)
- claude plugin update la@living-architecture
- Refresh the marketplace
- /plugin marketplace update living-architecture
- Turn it off for now
- /plugin disable la@living-architecture
- Remove it
- /plugin uninstall la@living-architecture
Skills in la
- arch-cleanupMotleyAI/living-architecture
Use 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.
13stars - arch-initMotleyAI/living-architecture
Build 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.
13stars - concise-commentsMotleyAI/living-architecture
Rules 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.
13stars - deterministic-refactorMotleyAI/living-architecture
Use to rename or move a module/class/function/method/attribute (Python or TypeScript) and update all imports/references, with a deterministic check that nothing was missed. Mutator = dr-refactor; the guarantee = la-typecheck + dr-mock-lint + the test suite. Only sound on a compliant target (see docs/deterministic-refactoring.md).
13stars - fetch-failed-pr-checksMotleyAI/living-architecture
Use 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.
13stars - initMotleyAI/living-architecture
Onboard a repo to the la plugin — detect its tracker, test/lint/type-check commands, Codex, Sonar and any existing OpenSpec or architecture setup, propose a complete living-architecture.yaml with a source for every key, ask only what cannot be detected, write the file, then offer the type-check baseline and la:arch-init. Also the fast path other skills run when a repo has no config, and the way to edit or convert an existing config.
13stars - living-architectureMotleyAI/living-architecture
Reference for the living-architecture layer (LikeC4 structure model + arc42 principles + model-truth import enforcement + cross-check): its syntax, the checks, the rules a coding agent follows when it changes code under it, and how to maintain it. Building the first model is la:arch-init; carving a boundary is la:arch-cleanup.
13stars - openspec-initMotleyAI/living-architecture
Initialize or repair OpenSpec in the current repo for the /la:pr flow. Ensures the openspec CLI is available (global install, npx fallback), scaffolds openspec/ with `openspec init --tools none` (corpus only, no /opsx:* commands), and verifies. Invoked by /la:pr when openspec/ is absent or invalid, or run directly.
13stars - prMotleyAI/living-architecture
Spec-driven change flow for a task given to an agent. Pulls in the tracker issue (Linear or GitHub, per `living-architecture.yaml`) that the current git branch belongs to, and combines it with whatever the user typed when invoking the skill. Rehydrates context, detects the current stage, and dispatches to the stage skills la:pr-plan → la:pr-tests → la:pr-implement → la:pr-review.
13stars - pr-implementMotleyAI/living-architecture
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.
13stars - pr-planMotleyAI/living-architecture
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.
13stars - pr-reviewMotleyAI/living-architecture
Stage 4 of 4 of the /la:pr flow — run /la:process-reviews in a loop until every source is green, then (OpenSpec repos only) archive the change, push, and keep looping on the archived HEAD until every source is green again so the PR can merge. 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.
13stars - pr-testsMotleyAI/living-architecture
Stage 2 of 4 of the /la:pr flow — write the full failing test suite for the agreed plan (TDD-first), then Codex-review the tests against the plan. 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.
13stars - process-reviewsMotleyAI/living-architecture
Use when the user asks to process / triage / address / handle PR reviews from CodeRabbit, SonarQube, Codex, and CI all together (CodeRabbit and Sonar only when they ran on the PR). Watches the PR every minute (30 min cap) and triages each new failed CI check, CodeRabbit comment and finished Sonar analysis as it appears, while a Codex review runs concurrently against the local diff. Once everything is terminal, fetches unresolved threads from all three code-review sources plus failed CI checks, validates each against the actual code / log, handles invalid ones in place (reply on thread / NOSONAR comment), and presents a unified plan for fixing the valid ones (split into logical groups if more than 3). Invoked from la:pr-review, it returns the triaged list instead.
13stars - reply-to-pr-threadMotleyAI/living-architecture
Use when the user asks to reply / comment on a CodeRabbit (or any) PR review thread, OR when posting a reasoning/explanation reply tagging @coderabbitai for a thread you've classified as invalid. Wraps `gh api .../pulls/N/comments/<id>/replies`. Body is read from stdin.
13stars - codex-reviewMotleyAI/living-architecture
Use 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.
13stars - fetch-coderabbit-threadsMotleyAI/living-architecture
Use 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.
13stars - make-diff-compliantMotleyAI/living-architecture
Use to bring exactly the source files a PR/branch touches up to the deterministic-refactor compliance conditions (typed, overrides marked, typed test doubles), so a future refactor over them is verifiable. Scoped to the diff — grows compliance monotonically, no repo-wide migration.
13stars - make-refactor-target-compliantMotleyAI/living-architecture
Use BEFORE renaming a symbol/attribute (Python or TypeScript) to make its blast radius verifiable — type the code that might reference it (untyped params/vars that could hold the class, classes with matching attribute names, overrides not marked as such) so the post-rename type-check gate is sound.
13stars
la plugin questions
How do I install the la plugin?
In Claude Code run /plugin marketplace add MotleyAI/living-architecture, then /plugin install la@living-architecture.
What does the la plugin include?
la bundles 19 skills.
How do I update or remove the la plugin?
Update it with claude plugin update la@living-architecture in your shell, or from the Installed tab of /plugin. Remove it with /plugin uninstall la@living-architecture.
What license is the la plugin under?
MIT, as stated in the plugin's manifest.