{"slug":"arch-init","title":"arch-init","summary":"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, an","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:43:58.673784Z","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: arch-init\ndescription: 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.</h2>\n<p><strong>Preflight:</strong> run <code>la-doctor --plugin &lt;this skill's base directory&gt; --require-config</code> once per session before using any <code>la-*</code> or <code>trmv-*</code> command. If it reports the missing-config finding (the one naming <code>/la:init</code>), run the fast path of the <code>la:init</code> skill, then re-run this preflight; stop and show the user its output on anything it still reports, or on any other failure. If <code>la-doctor</code> is not found, or reports the la tools older than the plugin, stop and give the user the install command at this plugin's <code>version</code> (in its <code>.claude-plugin/plugin.json</code>): <code>uv tool install living-architecture==&lt;version&gt; --with-executables-from type-rename-move</code> in a Python repo, <code>npm install -g living-architecture@&lt;version&gt; type-rename-move@&lt;version&gt;</code> in a TS/JS repo.</p>\n<p><strong>Stealth mode:</strong> if <code>la-config get stealth</code> prints <code>true</code>, STOP and tell the user this skill does not run in stealth\nmode: a model that is not versioned with the code cannot stay true across branches.</p>\n<h1>Build the first architecture model</h1>\n<p>The syntax of the model, <code>index.yaml</code>, views and arc42 files, and every check <code>la-arch-check</code> runs, are in\nthe <code>la:living-architecture</code> skill; read it first. Everything this skill writes is normative, like tests:\nshow each model, arc42 and <code>index.yaml</code> edit and get the user's OK before landing it.</p>\n<h2>1. Preconditions</h2>\n<ul>\n<li><code>architecture/index.yaml</code> does not exist (otherwise this is maintenance: use <code>la:living-architecture</code>).</li>\n<li><code>openspec: true</code> in the config means <code>openspec/</code> is healthy; if not, run <code>la:openspec-init</code> first.</li>\n<li>A type check with a baseline: run <code>trmv-typecheck</code>. If it checks a language that has no baseline, offer\n<code>trmv-typecheck --write-baseline</code> (the one legitimate recording; afterwards the baseline only shrinks). If it\nprints \"nothing to check\", tell the user that <code>la:arch-cleanup</code> cannot verify moves without one, and offer\nto set <code>commands.typecheck</code> first.</li>\n</ul>\n<h2>2. Language sections</h2>\n<p>Write <code>architecture/index.yaml</code> with one section per language the repo has: <code>root_package</code> (or\n<code>root_packages</code> when the language's code sits in several sibling directories under one <code>source_root</code>), and\n<code>source_root</code> / <code>tsconfig</code> where needed. Confirm them with the user. From now until step 8 <code>la-doctor</code>\nreports <code>architecture: false</code> against the new index; that is expected.</p>\n<h2>3. Scaffold</h2>\n<p>Run <code>la-arch-scaffold</code>. It writes, atomically, the as-is model in <code>architecture/model.c4</code> (one node per\ntop-level unit, one arrow per measured runtime import edge), one view per language in <code>architecture/views.c4</code>,\n<code>system.arc42.md</code> with the generated diagrams and TODO sections, and <code>legacy_arrows</code> / <code>diagrams</code> in\n<code>index.yaml</code>. It refuses (exit 2, writing nothing) when any LikeC4 file (<code>.c4</code>, <code>.likec4</code>) or arc42 file\nalready exists under <code>architecture/</code>. Show the user the model and the arrow list.</p>\n<h2>4. Choose the wedge</h2>\n<p>Offer only genuine options: less work is never a pro and more work never a con unless the amount is ridiculously large,\nand an option that breaks something working today is not offered without a very good reason.</p>\n<p>Interview the user, one question at a time, each with PROS/CONS and a RECOMMENDATION:</p>\n<ul>\n<li>which nodes are <strong>precise</strong> (usually the subsystem about to be worked on plus its neighbours) and which\nare swept into <strong>virtual buckets</strong>;</li>\n<li>the node titles;</li>\n<li>which measured arrows are wrong and slated to die: tag them <code>#legacy</code> and set <code>legacy_arrows.baseline</code> to\ntheir exact count;</li>\n<li>where the import law must hold child-level: nest elements under that node.</li>\n</ul>\n<p>The model stays true at every step: every arrow is a measured edge, and grandfathered ones are <code>#legacy</code>,\nnever omitted.</p>\n<h2>5. Principles</h2>\n<p>Draft <code>system.arc42.md</code> from the repo's own <code>CLAUDE.md</code> / <code>AGENTS.md</code> and the structure you measured:\nPurpose and context, numbered Principles (each with a status tag: <code>[enforced: …]</code>, <code>[review]</code> or\n<code>[target: …]</code>), and Rationale. Present the principles ONE BY ONE and land each only on the user's OK. Write an\nelement arc42 file (<code>architecture/&lt;element id&gt;.arc42.md</code>) only for the 1–3 elements that earn prose now.</p>\n<p>If the repo has an ADR or decisions file, fold its present-tense rules into the owning elements' principles,\nthen, with the user's OK, delete it (history stays in git and the OpenSpec archive).</p>\n<h2>6. Spec mapping</h2>\n<p>The scaffold maps no specs. Map every <code>openspec/specs/&lt;id&gt;</code> exactly once: in one element's metadata <code>specs</code> (at any depth), or\nin <code>cross_cutting_specs</code> with its <code>touches:</code> list. Decide each with the user.</p>\n<h2>7. Green</h2>\n<p>Run <code>la-arch-diagrams</code>, LikeC4 model validation (<code>npx likec4 validate</code>, or the lightest command that parses\nthe model) and <code>la-arch-check</code>, and fix until all are green.</p>\n<h2>8. Flip the gate</h2>\n<p>Set <code>architecture: true</code> in <code>living-architecture.yaml</code> and run <code>la-doctor --plugin &lt;this skill's base directory&gt; --require-config</code>\nuntil it passes. Do not wire CI. The user commits.</p>\n","files":[{"path":"SKILL.md","sizeBytes":5297,"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:45:52.959052Z","sha256":"7BACD3C8A17C99F29C96D48B6825697645551FBFAD321DC90841F418FFB63FB5","sizeBytes":2527},"review":null,"source":{"repositoryUrl":"https://github.com/MotleyAI/living-architecture","path":"plugin/la/skills/arch-init","license":"MIT","commit":"c1ecf0af05da41d754e0a83233334edf6cbca797","subtreeSha":"3D050EB9AE5649AF0E3EB9CD5B8C51921953EF04177FC9FB7BCC52E5DEBEC0DD","lastSyncedAt":"2026-11-29T00:43:57.908191Z"},"reviewedAt":"2026-11-29T00:52:16.089651Z","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/arch-init"},{"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"}]}