@spec-engine/spec-engine 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/agent-reference/index.html +1 -1
- package/dist/docs/commands/index.html +1 -1
- package/dist/docs/getting-started/index.html +30 -13
- package/dist/docs/guides/platform-setup/index.html +1 -0
- package/dist/docs/guides/single-repo/index.html +1 -0
- package/dist/docs/index.html +1 -1
- package/dist/docs/overview/index.html +3 -0
- package/dist/docs/pagefind/fragment/en_2d1adec.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_3b7d939.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_591940a.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_5f79492.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_8ef15c5.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_9f5f7d8.pf_fragment +0 -0
- package/dist/docs/pagefind/index/en_c844839.pf_index +0 -0
- package/dist/docs/pagefind/pagefind-entry.json +1 -1
- package/dist/docs/pagefind/pagefind.en_f3a4ba28d6.pf_meta +0 -0
- package/dist/impl.js +1 -1
- package/package.json +1 -1
- package/dist/docs/pagefind/fragment/en_3f97d08.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_51433aa.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_74b2c3a.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_b571467.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_cc9f632.pf_fragment +0 -0
- package/dist/docs/pagefind/fragment/en_dc8d1bd.pf_fragment +0 -0
- package/dist/docs/pagefind/index/en_4f59892.pf_index +0 -0
- package/dist/docs/pagefind/pagefind.en_c8da4a195d.pf_meta +0 -0
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<li>Coverage/drift/propagation are SQL projections over tags — never authored. Drift compares a member’s pin (<code dir="auto">spec-engine@N</code>, one platform-wide scalar) against each referenced requirement’s <code dir="auto">changed_at_version</code>, derived within its domain’s supersede DAG; the platform version is the max domain version, derived too.</li>
|
|
81
81
|
</ol>
|
|
82
82
|
<div class="sl-heading-wrapper level-h2"><h2 id="invocation">Invocation</h2><a class="sl-anchor-link" href="#invocation"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Invocation”</span></a></div>
|
|
83
|
-
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">bun</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">packages/engine/src/cli.ts</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0"><command></span><span style="--0:#D6DEEB;--1:#403F53"> [...]
|
|
83
|
+
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">bunx</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">@spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0"><command></span><span style="--0:#D6DEEB;--1:#403F53"> [...] </span><span style="--0:#919F9F;--1:#5F636F"># published npm package (requires Bun)</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0"><command></span><span style="--0:#D6DEEB;--1:#403F53"> [...] </span><span style="--0:#919F9F;--1:#5F636F"># after: bun add -g @spec-engine/spec-engine</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">bun</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">packages/engine/src/cli.ts</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0"><command></span><span style="--0:#D6DEEB;--1:#403F53"> [...] </span><span style="--0:#919F9F;--1:#5F636F"># from a checkout</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">./dist/spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0"><command></span><span style="--0:#D6DEEB;--1:#403F53"> [...] </span><span style="--0:#919F9F;--1:#5F636F"># compiled binary</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="bunx @spec-engine/spec-engine <command> [...] # published npm package (requires Bun)spec <command> [...] # after: bun add -g @spec-engine/spec-enginebun packages/engine/src/cli.ts <command> [...] # from a checkout./dist/spec <command> [...] # compiled binary"><div></div></button></div></figure></div>
|
|
84
84
|
<ul>
|
|
85
85
|
<li>Almost every command takes an optional trailing <code dir="auto">platformDir</code> positional (default: cwd)</li>
|
|
86
86
|
<li>All commands are non-interactive when stdin is not a TTY</li>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
})();
|
|
71
71
|
</script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-q2jvmmon"> <div class="social-icons astro-q2jvmmon"> <a href="https://github.com/spec-engine/spec-engine" rel="me" class="sl-flex astro-7c53pyad"><span class="sr-only astro-7c53pyad">GitHub</span><svg aria-hidden="true" class="astro-7c53pyad astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-xrbm3f6n"> <span class="sr-only astro-xrbm3f6n">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select autocomplete="off" class="astro-xrbm3f6n"> <option value="dark" class="astro-xrbm3f6n">Dark</option><option value="light" class="astro-xrbm3f6n">Light</option><option value="auto" selected class="astro-xrbm3f6n">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
|
|
72
72
|
StarlightThemeProvider.updatePickers();
|
|
73
|
-
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#exit-code-contract" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Exit code contract</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#common-flags" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Common flags</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#command-reference" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Command reference</span> </a> <ul class="isMobile astro-mc3l7tuo" style="--depth: 1;"> <li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-index-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec index [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-check-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec check [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-guard-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec guard [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-map-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec map [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-query-text-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec query <text> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-relations-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec relations [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-provenance-issueid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec provenance [issueId] [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-resolve-files-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec resolve <files...> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-propagation-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec propagation <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-gate-repo-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec gate <repo> <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-init-repo" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec init [repo]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-domain-new-name--spec-domain-list-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec domain new <name> / spec domain list [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-migrate-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec migrate [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-req-domain-prefix-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec req <domain-prefix> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-term-" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec term …</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-glossary-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec glossary [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-supersede-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec supersede <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-move-reqid-new-domain-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec move <reqId> <NEW-DOMAIN> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-amend-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec amend <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-serve-platformdir---port-n" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec serve [platformDir] [--port N]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-mcp-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec mcp [platformDir]</span> </a> </li> </ul> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#exit-code-contract" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Exit code contract</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#common-flags" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Common flags</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#command-reference" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Command reference</span> </a> <ul class="astro-mc3l7tuo" style="--depth: 1;"> <li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-index-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec index [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-check-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec check [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-guard-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec guard [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-map-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec map [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-query-text-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec query <text> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-relations-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec relations [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-provenance-issueid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec provenance [issueId] [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-resolve-files-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec resolve <files...> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-propagation-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec propagation <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-gate-repo-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec gate <repo> <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-init-repo" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec init [repo]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-domain-new-name--spec-domain-list-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec domain new <name> / spec domain list [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-migrate-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec migrate [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-req-domain-prefix-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec req <domain-prefix> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-term-" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec term …</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-glossary-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec glossary [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-supersede-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec supersede <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-move-reqid-new-domain-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec move <reqId> <NEW-DOMAIN> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-amend-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec amend <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-serve-platformdir---port-n" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec serve [platformDir] [--port N]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-mcp-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec mcp [platformDir]</span> </a> </li> </ul> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Commands</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <p>All commands are run via <code dir="auto">bun packages/engine/src/cli.ts <command> [args]</code> or <code dir="auto">./dist/spec <command> [args]</code>.</p>
|
|
73
|
+
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#exit-code-contract" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Exit code contract</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#common-flags" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Common flags</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#command-reference" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Command reference</span> </a> <ul class="isMobile astro-mc3l7tuo" style="--depth: 1;"> <li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-index-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec index [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-check-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec check [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-guard-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec guard [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-map-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec map [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-query-text-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec query <text> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-relations-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec relations [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-provenance-issueid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec provenance [issueId] [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-resolve-files-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec resolve <files...> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-propagation-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec propagation <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-gate-repo-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec gate <repo> <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-init-repo" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec init [repo]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-domain-new-name--spec-domain-list-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec domain new <name> / spec domain list [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-migrate-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec migrate [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-req-domain-prefix-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec req <domain-prefix> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-term-" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec term …</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-glossary-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec glossary [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-supersede-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec supersede <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-move-reqid-new-domain-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec move <reqId> <NEW-DOMAIN> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-amend-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec amend <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-serve-platformdir---port-n" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec serve [platformDir] [--port N]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-mcp-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec mcp [platformDir]</span> </a> </li> </ul> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#exit-code-contract" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Exit code contract</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#common-flags" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Common flags</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#command-reference" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Command reference</span> </a> <ul class="astro-mc3l7tuo" style="--depth: 1;"> <li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-index-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec index [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-check-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec check [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-guard-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec guard [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-map-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec map [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-query-text-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec query <text> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-relations-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec relations [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-provenance-issueid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec provenance [issueId] [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-resolve-files-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec resolve <files...> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-propagation-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec propagation <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-gate-repo-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec gate <repo> <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-init-repo" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec init [repo]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-domain-new-name--spec-domain-list-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec domain new <name> / spec domain list [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-migrate-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec migrate [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-req-domain-prefix-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec req <domain-prefix> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-term-" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec term …</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-glossary-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec glossary [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-supersede-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec supersede <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-move-reqid-new-domain-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec move <reqId> <NEW-DOMAIN> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-amend-reqid-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec amend <reqId> [platformDir]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-serve-platformdir---port-n" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec serve [platformDir] [--port N]</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 1;"> <a href="#spec-mcp-platformdir" class="astro-mc3l7tuo" style="--depth: 1;"> <span class="astro-mc3l7tuo" style="--depth: 1;">spec mcp [platformDir]</span> </a> </li> </ul> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Commands</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <p>Install the CLI from npm — <code dir="auto">bun add -g @spec-engine/spec-engine</code> puts <code dir="auto">spec</code> on your PATH, and every command below is written that way. Without a global install, run any of them as <code dir="auto">bunx @spec-engine/spec-engine <command> [args]</code>; from a checkout, as <code dir="auto">bun packages/engine/src/cli.ts <command> [args]</code>. See <a href="/getting-started/">Getting Started</a> for the details.</p>
|
|
74
74
|
<div class="sl-heading-wrapper level-h2"><h2 id="exit-code-contract">Exit code contract</h2><a class="sl-anchor-link" href="#exit-code-contract"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Exit code contract”</span></a></div>
|
|
75
75
|
|
|
76
76
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-hke2hksx"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Getting Started | Spec Engine</title><link rel="canonical" href="https://docs.spec-engine.dev/getting-started/"/><link rel="sitemap" href="/sitemap-index.xml"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="true"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png"/><link rel="apple-touch-icon" sizes="180x180" href="/favicon-180.png"/><link rel="manifest" href="/site.webmanifest"/><link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml"/><meta name="generator" content="Astro v6.4.8"/><meta name="generator" content="Starlight v0.40.0"/><meta property="og:title" content="Getting Started"/><meta property="og:type" content="article"/><meta property="og:url" content="https://docs.spec-engine.dev/getting-started/"/><meta property="og:locale" content="en"/><meta property="og:description" content="
|
|
1
|
+
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-hke2hksx"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Getting Started | Spec Engine</title><link rel="canonical" href="https://docs.spec-engine.dev/getting-started/"/><link rel="sitemap" href="/sitemap-index.xml"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="true"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png"/><link rel="apple-touch-icon" sizes="180x180" href="/favicon-180.png"/><link rel="manifest" href="/site.webmanifest"/><link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml"/><meta name="generator" content="Astro v6.4.8"/><meta name="generator" content="Starlight v0.40.0"/><meta property="og:title" content="Getting Started"/><meta property="og:type" content="article"/><meta property="og:url" content="https://docs.spec-engine.dev/getting-started/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Install Spec Engine from npm and run your first check in under a minute"/><meta property="og:site_name" content="Spec Engine"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Install Spec Engine from npm and run your first check in under a minute"/><meta name="theme-color" content="#0F1214"/><meta property="og:image" content="https://docs.spec-engine.dev/og-spec-engine-docs.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta name="twitter:image" content="https://docs.spec-engine.dev/og-spec-engine-docs.png"/><script>
|
|
2
2
|
window.StarlightThemeProvider = (() => {
|
|
3
3
|
const storedTheme =
|
|
4
4
|
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
|
|
@@ -70,23 +70,40 @@
|
|
|
70
70
|
})();
|
|
71
71
|
</script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-q2jvmmon"> <div class="social-icons astro-q2jvmmon"> <a href="https://github.com/spec-engine/spec-engine" rel="me" class="sl-flex astro-7c53pyad"><span class="sr-only astro-7c53pyad">GitHub</span><svg aria-hidden="true" class="astro-7c53pyad astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-xrbm3f6n"> <span class="sr-only astro-xrbm3f6n">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select autocomplete="off" class="astro-xrbm3f6n"> <option value="dark" class="astro-xrbm3f6n">Dark</option><option value="light" class="astro-xrbm3f6n">Light</option><option value="auto" selected class="astro-xrbm3f6n">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
|
|
72
72
|
StarlightThemeProvider.updatePickers();
|
|
73
|
-
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#
|
|
74
|
-
<
|
|
75
|
-
<p>
|
|
76
|
-
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">
|
|
73
|
+
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#install" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Install</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#your-first-platform-in-60-seconds" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Your first platform in ~60 seconds</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#explore-the-shipped-fixtures" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Explore the shipped fixtures</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#single-repo-rung-1" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Single repo (rung 1)</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#grow-to-a-platform" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Grow to a platform</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#read-these-docs-offline" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Read these docs offline</span> </a> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#install" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Install</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#your-first-platform-in-60-seconds" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Your first platform in ~60 seconds</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#explore-the-shipped-fixtures" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Explore the shipped fixtures</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#single-repo-rung-1" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Single repo (rung 1)</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#grow-to-a-platform" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Grow to a platform</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#read-these-docs-offline" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Read these docs offline</span> </a> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Getting Started</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <div class="sl-heading-wrapper level-h2"><h2 id="install">Install</h2><a class="sl-anchor-link" href="#install"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Install”</span></a></div>
|
|
74
|
+
<p>Spec Engine ships as one npm package — <code dir="auto">@spec-engine/spec-engine</code> — carrying the <code dir="auto">spec</code> CLI, the local webapp (<code dir="auto">spec serve</code>), and these docs offline (<code dir="auto">spec docs</code>). No clone, no build step, no service.</p>
|
|
75
|
+
<p>It needs the <a href="https://bun.sh">Bun</a> runtime (>= 1.3): the index engine uses <code dir="auto">bun:sqlite</code> and does not run under Node.</p>
|
|
76
|
+
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">bunx</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">@spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--help</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># run it once, without installing</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">bun</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">add</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">-g</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">@spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># or put the `spec` bin on your PATH</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ bunx @spec-engine/spec-engine --help # run it once, without installing$ bun add -g @spec-engine/spec-engine # or put the `spec` bin on your PATH"><div></div></button></div></figure></div>
|
|
77
|
+
<p>Every example in these docs calls the CLI as plain <code dir="auto">spec</code>, which is what the global install gives you. If you’d rather not install, read <code dir="auto">spec <command></code> as <code dir="auto">bunx @spec-engine/spec-engine <command></code> throughout — the two are interchangeable.</p>
|
|
78
|
+
<div class="sl-heading-wrapper level-h2"><h2 id="your-first-platform-in-60-seconds">Your first platform in ~60 seconds</h2><a class="sl-anchor-link" href="#your-first-platform-in-60-seconds"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Your first platform in ~60 seconds”</span></a></div>
|
|
79
|
+
<p>Nothing here needs a checkout. In any repo of your own:</p>
|
|
80
|
+
<p><strong>1. Scaffold a domain and author the first requirement</strong> — no hand-written JSON:</p>
|
|
81
|
+
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">domain</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">new</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">created</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine/ORDERS/SPEC.json</span></div></div><div class="ec-line"><div class="code">
|
|
82
|
+
</div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">req</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">orders</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--text</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">An order total equals the sum of its line items.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--why</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">Mispriced orders ship money out the door silently.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--lives</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">src/orders.ts</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">appended</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS-001</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">to</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine/ORDERS/SPEC.json</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec domain new ORDERScreated spec-engine/ORDERS/SPEC.json$ spec req orders --text "An order total equals the sum of its line items." \ --why "Mispriced orders ship money out the door silently." \ --lives "src/orders.ts"appended ORDERS-001 to spec-engine/ORDERS/SPEC.json"><div></div></button></div></figure></div>
|
|
83
|
+
<p><strong>2. Bind code to it</strong> with a <code dir="auto">@spec</code> tag — implementation and test:</p>
|
|
84
|
+
<div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/orders.ts</span></figcaption><pre data-language="ts"><code><div class="ec-line"><div class="code"><span style="--0:#C792EA;--1:#8844AE">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8844AE">function</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">total</span><span style="--0:#D9F5DD;--1:#111111">()</span><span style="--0:#D6DEEB;--1:#403F53"> { </span><span style="--0:#919F9F;--1:#5F636F">/* … */</span><span style="--0:#D6DEEB;--1:#403F53"> } </span><span style="--0:#919F9F;--1:#5D6376">// @spec ORDERS-001</span></div></div><div class="ec-line"><div class="code">
|
|
85
|
+
</div></div><div class="ec-line"><div class="code"><span style="--0:#919F9F;--1:#5D6376">// test/orders.test.ts</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">it</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">sums line items</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#D9F5DD;--1:#111111">()</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8844AE">=></span><span style="--0:#D6DEEB;--1:#403F53"> {}) </span><span style="--0:#919F9F;--1:#5D6376">// @spec ORDERS-001 unit</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="export function total() { /* … */ } // @spec ORDERS-001// test/orders.test.tsit("sums line items", () => {}) // @spec ORDERS-001 unit"><div></div></button></div></figure></div>
|
|
86
|
+
<p>The tag kind is path-derived: a tag in implementation code <em>implements</em>, a tag in a test path <em>verifies</em>. You never write those words yourself.</p>
|
|
87
|
+
<p><strong>3. See the coverage matrix</strong> — every requirement × every repo:</p>
|
|
88
|
+
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">map</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">.</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">DOMAIN</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">REQUIREMENT</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">STATUS</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">my-app</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">ORDERS</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS-001</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Active</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src+test</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec map .DOMAIN REQUIREMENT STATUS my-app spec-engineORDERS ORDERS-001 Active src+test —"><div></div></button></div></figure></div>
|
|
77
89
|
<p>Each cell is <code dir="auto">src</code> (implemented), <code dir="auto">test</code> (verified), <code dir="auto">src+test</code> (both), or <code dir="auto">—</code> (no coverage).</p>
|
|
90
|
+
<p><strong>4. Check integrity</strong> — dangling tags, drift, orphans, superseded references:</p>
|
|
91
|
+
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">.</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec check ."><div></div></button></div></figure></div>
|
|
92
|
+
<p>Exit <code dir="auto">0</code> is clean; exit <code dir="auto">1</code> means an error-severity diagnostic you should fix before merging. That’s the whole loop: <strong>write specs, tag code, check the platform.</strong></p>
|
|
93
|
+
<div class="sl-heading-wrapper level-h2"><h2 id="explore-the-shipped-fixtures">Explore the shipped fixtures</h2><a class="sl-anchor-link" href="#explore-the-shipped-fixtures"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Explore the shipped fixtures”</span></a></div>
|
|
94
|
+
<p>The <a href="https://github.com/spec-engine/spec-engine">repo</a> ships <code dir="auto">fixtures/platform-fixture</code> — a canonical <code dir="auto">spec-engine/</code> plus three member repos, with drift deliberately planted so <code dir="auto">spec check</code> has something to catch. The fixtures are test data and are <strong>not</strong> part of the npm package, so this one needs a clone:</p>
|
|
95
|
+
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">git</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">clone</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">https://github.com/spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> && </span><span style="--0:#C5E478;--1:#3B61B0">cd</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">map</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">fixtures/platform-fixture</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">DOMAIN</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">REQUIREMENT</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">STATUS</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">admin</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">api</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">mobile</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">AUTH</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">AUTH-001</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Active</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">BILLING</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">BILLING-001</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Superseded</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">BILLING</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">BILLING-002</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Active</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">BILLING</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">BILLING-007</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Active</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src+test</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src+test</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">BILLING</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">BILLING-009</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">Active</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">src+test</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">—</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ git clone https://github.com/spec-engine/spec-engine && cd spec-engine$ spec map fixtures/platform-fixtureDOMAIN REQUIREMENT STATUS admin api mobile spec-engineAUTH AUTH-001 Active — — — —BILLING BILLING-001 Superseded — — src —BILLING BILLING-002 Active — src — —BILLING BILLING-007 Active src+test src+test src —BILLING BILLING-009 Active — src+test — —"><div></div></button></div></figure></div>
|
|
78
96
|
<div class="sl-heading-wrapper level-h2"><h2 id="single-repo-rung-1">Single repo (rung 1)</h2><a class="sl-anchor-link" href="#single-repo-rung-1"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Single repo (rung 1)”</span></a></div>
|
|
79
|
-
<p>The bottom rung: one repo, specs inline, zero ceremony. A repo with an in-repo <code dir="auto">spec-engine/<DOMAIN>/SPEC.json</code> and a <code dir="auto">@spec</code> tag in its own code self-consumes
|
|
80
|
-
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">
|
|
81
|
-
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">index</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">fixtures/single-repo-fixture</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">map</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">fixtures/single-repo-fixture</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">check</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">fixtures/single-repo-fixture</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec index fixtures/single-repo-fixture$ spec map fixtures/single-repo-fixture$ spec check fixtures/single-repo-fixture"><div></div></button></div></figure></div>
|
|
97
|
+
<p>The bottom rung: one repo, specs inline, zero ceremony. A repo with an in-repo <code dir="auto">spec-engine/<DOMAIN>/SPEC.json</code> and a <code dir="auto">@spec</code> tag in its own code self-consumes — no sibling members, no <code dir="auto">spec init</code>:</p>
|
|
98
|
+
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">my-repo/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">spec-engine/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">ORDERS/SPEC.json ORDERS-001 / ORDERS-002 / ORDERS-003 (active)</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">src/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">orders.ts // @spec ORDERS-001 // @spec ORDERS-002</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">test/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">orders.test.ts // @spec ORDERS-001 unit</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="my-repo/ spec-engine/ ORDERS/SPEC.json ORDERS-001 / ORDERS-002 / ORDERS-003 (active) src/ orders.ts // @spec ORDERS-001 // @spec ORDERS-002 test/ orders.test.ts // @spec ORDERS-001 unit"><div></div></button></div></figure></div>
|
|
82
99
|
<p><strong>Promote to multi-repo</strong> when you outgrow one repo: <code dir="auto">git mv spec-engine/ ../spec-engine</code> lifts the inline specs into a dedicated repo.</p>
|
|
83
|
-
<div class="sl-heading-wrapper level-h2"><h2 id="
|
|
100
|
+
<div class="sl-heading-wrapper level-h2"><h2 id="grow-to-a-platform">Grow to a platform</h2><a class="sl-anchor-link" href="#grow-to-a-platform"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Grow to a platform”</span></a></div>
|
|
84
101
|
<ol>
|
|
85
|
-
<li>Scaffold a domain and author the first requirement — no hand-written JSON needed:
|
|
86
|
-
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">domain</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">new</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">req</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">orders</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--text</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">An order total equals the sum of its line items.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--why</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">Mispriced orders ship money out the door silently.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--lives</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">checkout/src/total.ts</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec domain new ORDERS$ spec req orders --text "An order total equals the sum of its line items." \ --why "Mispriced orders ship money out the door silently." \ --lives "checkout/src/total.ts""><div></div></button></div></figure></div>
|
|
87
|
-
</li>
|
|
88
102
|
<li>Add a member repo beside <code dir="auto">spec-engine/</code> with <code dir="auto">@spec ORDERS-001</code> tags in source and test files</li>
|
|
89
103
|
<li>Pin the member: <code dir="auto">spec init checkout</code> (the default pin is the derived platform version)</li>
|
|
90
104
|
<li>Index and check: <code dir="auto">spec index && spec check</code></li>
|
|
91
105
|
</ol>
|
|
92
|
-
<p>See the <a href="/guides/platform-setup/">Platform Setup guide</a> for the full walkthrough.</p>
|
|
106
|
+
<p>See the <a href="/guides/platform-setup/">Platform Setup guide</a> for the full walkthrough.</p>
|
|
107
|
+
<div class="sl-heading-wrapper level-h2"><h2 id="read-these-docs-offline">Read these docs offline</h2><a class="sl-anchor-link" href="#read-these-docs-offline"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Read these docs offline”</span></a></div>
|
|
108
|
+
<p>The package embeds this whole site. No network needed:</p>
|
|
109
|
+
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">docs</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec docs"><div></div></button></div></figure></div> </div> <footer class="sl-flex astro-g7gasbrj"> <div class="meta sl-flex astro-g7gasbrj"> <a href="https://github.com/spec-engine/spec-engine/edit/main/packages/site/src/content/docs/getting-started.md" class="sl-flex print:hidden astro-tr6myc4c"><svg aria-hidden="true" class="astro-tr6myc4c astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg>Edit page</a> </div> <div class="pagination-links print:hidden astro-iud5vnm7" dir="ltr"> <a href="/overview/" rel="prev" class="astro-iud5vnm7"> <svg aria-hidden="true" class="astro-iud5vnm7 astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg> <span class="astro-iud5vnm7"> Previous <br class="astro-iud5vnm7"> <span class="link-title astro-iud5vnm7">Overview</span> </span> </a> <a href="/architecture/" rel="next" class="astro-iud5vnm7"> <svg aria-hidden="true" class="astro-iud5vnm7 astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg> <span class="astro-iud5vnm7"> Next <br class="astro-iud5vnm7"> <span class="link-title astro-iud5vnm7">Architecture</span> </span> </a> </div> </footer> </div> </div> </main> </div> </div> </div> </div> </body></html>
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
</script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-q2jvmmon"> <div class="social-icons astro-q2jvmmon"> <a href="https://github.com/spec-engine/spec-engine" rel="me" class="sl-flex astro-7c53pyad"><span class="sr-only astro-7c53pyad">GitHub</span><svg aria-hidden="true" class="astro-7c53pyad astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-xrbm3f6n"> <span class="sr-only astro-xrbm3f6n">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select autocomplete="off" class="astro-xrbm3f6n"> <option value="dark" class="astro-xrbm3f6n">Dark</option><option value="light" class="astro-xrbm3f6n">Light</option><option value="auto" selected class="astro-xrbm3f6n">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
|
|
72
72
|
StarlightThemeProvider.updatePickers();
|
|
73
73
|
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-1-create-the-domain-and-its-first-requirement" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 1: Create the domain and its first requirement</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-2-add-a-member" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 2: Add a member</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-3-pin-and-index" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 3: Pin and index</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#next-steps" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Next steps</span> </a> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-1-create-the-domain-and-its-first-requirement" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 1: Create the domain and its first requirement</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-2-add-a-member" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 2: Add a member</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#step-3-pin-and-index" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Step 3: Pin and index</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#next-steps" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Next steps</span> </a> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Platform Setup</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <p>A platform is a directory holding a canonical <code dir="auto">spec-engine/</code> folder plus one or more member repos beside it. Every step below is a CLI command — you never hand-write JSON.</p>
|
|
74
|
+
<p>Need the CLI first? <code dir="auto">bun add -g @spec-engine/spec-engine</code> puts <code dir="auto">spec</code> on your PATH — no clone required. See <a href="/getting-started/">Getting Started</a>.</p>
|
|
74
75
|
<div class="sl-heading-wrapper level-h2"><h2 id="step-1-create-the-domain-and-its-first-requirement">Step 1: Create the domain and its first requirement</h2><a class="sl-anchor-link" href="#step-1-create-the-domain-and-its-first-requirement"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Step 1: Create the domain and its first requirement”</span></a></div>
|
|
75
76
|
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">domain</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">new</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">created</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine/ORDERS/SPEC.json</span></div></div><div class="ec-line"><div class="code">
|
|
76
77
|
</div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">req</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">orders</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--text</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">An order total equals the sum of its line items.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--why</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">Mispriced orders ship money out the door silently.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#F78C6C;--1:#AA0982">\</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3B61B0">--lives</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">checkout/src/total.ts</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">appended</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">ORDERS-001</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">to</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">spec-engine/ORDERS/SPEC.json</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ spec domain new ORDERScreated spec-engine/ORDERS/SPEC.json$ spec req orders --text "An order total equals the sum of its line items." \ --why "Mispriced orders ship money out the door silently." \ --lives "checkout/src/total.ts"appended ORDERS-001 to spec-engine/ORDERS/SPEC.json"><div></div></button></div></figure></div>
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
</script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-q2jvmmon"> <div class="social-icons astro-q2jvmmon"> <a href="https://github.com/spec-engine/spec-engine" rel="me" class="sl-flex astro-7c53pyad"><span class="sr-only astro-7c53pyad">GitHub</span><svg aria-hidden="true" class="astro-7c53pyad astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg></a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-xrbm3f6n"> <span class="sr-only astro-xrbm3f6n">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select autocomplete="off" class="astro-xrbm3f6n"> <option value="dark" class="astro-xrbm3f6n">Dark</option><option value="light" class="astro-xrbm3f6n">Light</option><option value="auto" selected class="astro-xrbm3f6n">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-xrbm3f6n astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
|
|
72
72
|
StarlightThemeProvider.updatePickers();
|
|
73
73
|
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#layout" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Layout</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#commands" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Commands</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#promote-to-multi-repo" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Promote to multi-repo</span> </a> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#layout" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Layout</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#commands" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Commands</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#promote-to-multi-repo" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Promote to multi-repo</span> </a> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Single Repo (Rung 1)</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <p>The bottom rung of the adoption ladder: one repo, specs inline, zero ceremony — no sibling members, no <code dir="auto">spec-engine.member.json</code>, no <code dir="auto">spec init</code>.</p>
|
|
74
|
+
<p>Need the CLI first? <code dir="auto">bun add -g @spec-engine/spec-engine</code> puts <code dir="auto">spec</code> on your PATH — no clone required. See <a href="/getting-started/">Getting Started</a>.</p>
|
|
74
75
|
<div class="sl-heading-wrapper level-h2"><h2 id="layout">Layout</h2><a class="sl-anchor-link" href="#layout"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Layout”</span></a></div>
|
|
75
76
|
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">my-repo/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">spec-engine/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">ORDERS/SPEC.json ORDERS-001 / ORDERS-002 / ORDERS-003</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">src/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">orders.ts // @spec ORDERS-001 // @spec ORDERS-002</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">test/</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">orders.test.ts // @spec ORDERS-001 unit</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="my-repo/ spec-engine/ ORDERS/SPEC.json ORDERS-001 / ORDERS-002 / ORDERS-003 src/ orders.ts // @spec ORDERS-001 // @spec ORDERS-002 test/ orders.test.ts // @spec ORDERS-001 unit"><div></div></button></div></figure></div>
|
|
76
77
|
<div class="sl-heading-wrapper level-h2"><h2 id="commands">Commands</h2><a class="sl-anchor-link" href="#commands"><span aria-hidden="true" class="sl-anchor-icon"><svg width="16" height="16" viewBox="0 0 24 24"><path fill="currentcolor" d="m12.11 15.39-3.88 3.88a2.52 2.52 0 0 1-3.5 0 2.47 2.47 0 0 1 0-3.5l3.88-3.88a1 1 0 0 0-1.42-1.42l-3.88 3.89a4.48 4.48 0 0 0 6.33 6.33l3.89-3.88a1 1 0 1 0-1.42-1.42Zm8.58-12.08a4.49 4.49 0 0 0-6.33 0l-3.89 3.88a1 1 0 0 0 1.42 1.42l3.88-3.88a2.52 2.52 0 0 1 3.5 0 2.47 2.47 0 0 1 0 3.5l-3.88 3.88a1 1 0 1 0 1.42 1.42l3.88-3.89a4.49 4.49 0 0 0 0-6.33ZM8.83 15.17a1 1 0 0 0 1.1.22 1 1 0 0 0 .32-.22l4.92-4.92a1 1 0 0 0-1.42-1.42l-4.92 4.92a1 1 0 0 0 0 1.42Z"></path></svg></span><span class="sr-only" data-pagefind-ignore="">Section titled “Commands”</span></a></div>
|
package/dist/docs/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Keep your<br class="astro-j7pv25f6"><span style="white-space:nowrap" class="astro-j7pv25f6">coding agents <span style="background:var(--acc);color:var(--acc-ink);padding:0 8px" class="astro-j7pv25f6">honest.</span></span> </h1> <p style="font-size:18px;line-height:1.6;color:var(--dim-d);max-width:520px;margin:26px 0 0" class="astro-j7pv25f6">
|
|
6
6
|
Write your requirements as durable specs with permanent IDs. Spec Engine binds them to the real code
|
|
7
7
|
across every repo and catches drift in CI, before it ships.
|
|
8
|
-
</p> <div style="display:flex;gap:13px;margin-top:34px;flex-wrap:wrap" class="astro-j7pv25f6"> <a href="https://github.com/spec-engine/spec-engine" class="btn-acc astro-j7pv25f6" style="display:inline-flex;align-items:center;gap:10px;font-family:var(--f-disp);font-weight:700;font-size:15px;background:var(--acc);color:var(--acc-ink);border-radius:7px;padding:14px 24px"><svg width="17" height="17" viewBox="0 0 16 16" fill="currentColor" style="flex:none" class="astro-j7pv25f6"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.65-.89-3.65-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.13 0 0 .67-.21 2.2.82a7.6 7.6 0 012-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.11.16 1.93.08 2.13.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8 8 0 008 0z" class="astro-j7pv25f6"></path></svg>Start free</a> <a href="/overview/" class="btn-ghost astro-j7pv25f6" style="font-family:var(--f-disp);font-weight:700;font-size:15px;color:var(--fg-d);border:1.5px solid var(--line-d2);border-radius:7px;padding:13px 24px">Read the docs</a> </div> <div style="display:flex;align-items:center;gap:18px;margin-top:30px;font-family:var(--f-mono);font-size:12px;color:var(--mute-d);flex-wrap:wrap" class="astro-j7pv25f6"> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--verified)" class="astro-j7pv25f6"></span>verified</span> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--drift)" class="astro-j7pv25f6"></span>drift</span> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--broken)" class="astro-j7pv25f6"></span>broken</span> <span class="astro-j7pv25f6">caught in CI, per requirement</span> </div> </div> <!-- hero product panel --> <div style="background:var(--panel);border:1px solid var(--line-d);border-radius:11px;overflow:hidden;box-shadow:0 30px 70px rgba(0,0,0,0.5)" class="astro-j7pv25f6"> <div style="display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line-d);background:var(--charcoal)" class="astro-j7pv25f6"> <span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span><span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span><span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span> <span style="font-family:var(--f-mono);font-size:11px;color:var(--mute-d);margin-left:8px" class="astro-j7pv25f6">specs/billing.spec.md</span> </div> <div style="padding:20px;font-family:var(--f-mono);font-size:13px;line-height:1.9" class="astro-j7pv25f6"> <div class="astro-j7pv25f6"> <span style="color:var(--mute-d)" class="astro-j7pv25f6">## </span><span style="color:var(--acc)" class="astro-j7pv25f6">[SPEC-0042]</span> <span style="color:var(--fg-d)" class="astro-j7pv25f6">Refunds are idempotent</span> </div> <div style="color:var(--dim-d);padding-left:20px" class="astro-j7pv25f6">Replaying a refund with the same key</div> <div style="color:var(--dim-d);padding-left:20px" class="astro-j7pv25f6">must never issue a second refund.</div> </div> <div style="border-top:1px solid var(--line-d);padding:16px 20px;display:flex;flex-direction:column;gap:11px" class="astro-j7pv25f6"> <div style="display:flex;align-items:center;gap:10px;font-family:var(--f-mono);font-size:12px" class="astro-j7pv25f6"> <span style="color:var(--mute-d);width:52px" class="astro-j7pv25f6">impl</span><span style="color:var(--dim-d);flex:1" class="astro-j7pv25f6">worker/refunds/handler.ts:44</span><span style="color:var(--dim-d)" class="astro-j7pv25f6">agent·Claude</span> </div> <div style="display:flex;align-items:center;gap:10px;font-family:var(--f-mono);font-size:12px" class="astro-j7pv25f6"> <span style="color:var(--mute-d);width:52px" class="astro-j7pv25f6">test</span><span style="color:var(--dim-d);flex:1" class="astro-j7pv25f6">worker/refunds/handler.test.ts</span><span style="color:var(--dim-d)" class="astro-j7pv25f6">ci·unit</span> </div> <div style="display:flex;align-items:center;justify-content:space-between;margin-top:5px" class="astro-j7pv25f6"> <span style="font-family:var(--f-mono);font-size:11px;color:var(--mute-d)" class="astro-j7pv25f6">bound across 3 repos</span> <span style="display:inline-flex;align-items:center;gap:7px;font-family:var(--f-mono);font-size:11px;font-weight:600;color:var(--acc-ink);background:var(--acc);border-radius:5px;padding:5px 10px" class="astro-j7pv25f6"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" class="astro-j7pv25f6"><path d="M5 12 L10 17 L19 6" stroke="var(--acc-ink)" stroke-width="2.4" class="astro-j7pv25f6"></path></svg>VERIFIED</span> </div> </div> </div> </div> </section> <!-- ============ QUICK START BAR ============ --> <div style="background:var(--charcoal);border-bottom:1px solid var(--line-d)" class="astro-j7pv25f6"> <div style="max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:16px 28px" class="astro-j7pv25f6"> <span style="font-family:var(--f-mono);font-size:11px;letter-spacing:0.12em;color:var(--mute-d)" class="astro-j7pv25f6">QUICK START</span> <div style="display:flex;align-items:center;gap:13px;background:var(--ink);border:1px solid var(--line-d2);border-radius:8px;padding:11px 16px;font-family:var(--f-mono);font-size:14px" class="astro-j7pv25f6"> <span style="color:var(--acc)" class="astro-j7pv25f6">$</span> <span id="quickstart-cmd" style="color:var(--fg-d)" class="astro-j7pv25f6">
|
|
8
|
+
</p> <div style="display:flex;gap:13px;margin-top:34px;flex-wrap:wrap" class="astro-j7pv25f6"> <a href="https://github.com/spec-engine/spec-engine" class="btn-acc astro-j7pv25f6" style="display:inline-flex;align-items:center;gap:10px;font-family:var(--f-disp);font-weight:700;font-size:15px;background:var(--acc);color:var(--acc-ink);border-radius:7px;padding:14px 24px"><svg width="17" height="17" viewBox="0 0 16 16" fill="currentColor" style="flex:none" class="astro-j7pv25f6"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.65-.89-3.65-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.13 0 0 .67-.21 2.2.82a7.6 7.6 0 012-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.11.16 1.93.08 2.13.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8 8 0 008 0z" class="astro-j7pv25f6"></path></svg>Start free</a> <a href="/overview/" class="btn-ghost astro-j7pv25f6" style="font-family:var(--f-disp);font-weight:700;font-size:15px;color:var(--fg-d);border:1.5px solid var(--line-d2);border-radius:7px;padding:13px 24px">Read the docs</a> </div> <div style="display:flex;align-items:center;gap:18px;margin-top:30px;font-family:var(--f-mono);font-size:12px;color:var(--mute-d);flex-wrap:wrap" class="astro-j7pv25f6"> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--verified)" class="astro-j7pv25f6"></span>verified</span> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--drift)" class="astro-j7pv25f6"></span>drift</span> <span style="display:flex;align-items:center;gap:7px" class="astro-j7pv25f6"><span style="width:8px;height:8px;border-radius:2px;background:var(--broken)" class="astro-j7pv25f6"></span>broken</span> <span class="astro-j7pv25f6">caught in CI, per requirement</span> </div> </div> <!-- hero product panel --> <div style="background:var(--panel);border:1px solid var(--line-d);border-radius:11px;overflow:hidden;box-shadow:0 30px 70px rgba(0,0,0,0.5)" class="astro-j7pv25f6"> <div style="display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line-d);background:var(--charcoal)" class="astro-j7pv25f6"> <span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span><span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span><span style="width:9px;height:9px;border-radius:50%;background:#3A424A" class="astro-j7pv25f6"></span> <span style="font-family:var(--f-mono);font-size:11px;color:var(--mute-d);margin-left:8px" class="astro-j7pv25f6">specs/billing.spec.md</span> </div> <div style="padding:20px;font-family:var(--f-mono);font-size:13px;line-height:1.9" class="astro-j7pv25f6"> <div class="astro-j7pv25f6"> <span style="color:var(--mute-d)" class="astro-j7pv25f6">## </span><span style="color:var(--acc)" class="astro-j7pv25f6">[SPEC-0042]</span> <span style="color:var(--fg-d)" class="astro-j7pv25f6">Refunds are idempotent</span> </div> <div style="color:var(--dim-d);padding-left:20px" class="astro-j7pv25f6">Replaying a refund with the same key</div> <div style="color:var(--dim-d);padding-left:20px" class="astro-j7pv25f6">must never issue a second refund.</div> </div> <div style="border-top:1px solid var(--line-d);padding:16px 20px;display:flex;flex-direction:column;gap:11px" class="astro-j7pv25f6"> <div style="display:flex;align-items:center;gap:10px;font-family:var(--f-mono);font-size:12px" class="astro-j7pv25f6"> <span style="color:var(--mute-d);width:52px" class="astro-j7pv25f6">impl</span><span style="color:var(--dim-d);flex:1" class="astro-j7pv25f6">worker/refunds/handler.ts:44</span><span style="color:var(--dim-d)" class="astro-j7pv25f6">agent·Claude</span> </div> <div style="display:flex;align-items:center;gap:10px;font-family:var(--f-mono);font-size:12px" class="astro-j7pv25f6"> <span style="color:var(--mute-d);width:52px" class="astro-j7pv25f6">test</span><span style="color:var(--dim-d);flex:1" class="astro-j7pv25f6">worker/refunds/handler.test.ts</span><span style="color:var(--dim-d)" class="astro-j7pv25f6">ci·unit</span> </div> <div style="display:flex;align-items:center;justify-content:space-between;margin-top:5px" class="astro-j7pv25f6"> <span style="font-family:var(--f-mono);font-size:11px;color:var(--mute-d)" class="astro-j7pv25f6">bound across 3 repos</span> <span style="display:inline-flex;align-items:center;gap:7px;font-family:var(--f-mono);font-size:11px;font-weight:600;color:var(--acc-ink);background:var(--acc);border-radius:5px;padding:5px 10px" class="astro-j7pv25f6"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" class="astro-j7pv25f6"><path d="M5 12 L10 17 L19 6" stroke="var(--acc-ink)" stroke-width="2.4" class="astro-j7pv25f6"></path></svg>VERIFIED</span> </div> </div> </div> </div> </section> <!-- ============ QUICK START BAR ============ --> <div style="background:var(--charcoal);border-bottom:1px solid var(--line-d)" class="astro-j7pv25f6"> <div style="max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:16px 28px" class="astro-j7pv25f6"> <span style="font-family:var(--f-mono);font-size:11px;letter-spacing:0.12em;color:var(--mute-d)" class="astro-j7pv25f6">QUICK START</span> <div style="display:flex;align-items:center;gap:13px;background:var(--ink);border:1px solid var(--line-d2);border-radius:8px;padding:11px 16px;font-family:var(--f-mono);font-size:14px" class="astro-j7pv25f6"> <span style="color:var(--acc)" class="astro-j7pv25f6">$</span> <span id="quickstart-cmd" style="color:var(--fg-d)" class="astro-j7pv25f6">bun add -g @spec-engine/spec-engine</span> <span style="width:1px;height:16px;background:var(--line-d2)" class="astro-j7pv25f6"></span> <button id="quickstart-copy" aria-label="Copy install command" style="all:unset;display:flex;cursor:pointer" class="astro-j7pv25f6"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" class="astro-j7pv25f6"><rect x="8" y="8" width="12" height="12" rx="2" stroke="var(--mute-d)" stroke-width="1.75" class="astro-j7pv25f6"></rect><path d="M5 16 V6 A2 2 0 017 4 H15" stroke="var(--mute-d)" stroke-width="1.75" class="astro-j7pv25f6"></path></svg></button> </div> </div> </div> <!-- ============ IDEA / PILLARS ============ --> <section style="background:var(--bone);color:var(--fg-l);border-bottom:1px solid var(--line-l)" class="astro-j7pv25f6"> <div style="max-width:1200px;margin:0 auto;padding:92px 28px" class="astro-j7pv25f6"> <div style="font-family:var(--f-mono);font-size:12px;letter-spacing:0.16em;color:var(--mute-l);margin-bottom:26px" class="astro-j7pv25f6">
|
|
9
9
|
WHY IT HOLDS
|
|
10
10
|
</div> <p style="font-family:var(--f-disp);font-weight:700;font-size:clamp(26px,3.4vw,40px);line-height:1.2;letter-spacing:-0.025em;max-width:940px;margin:0" class="astro-j7pv25f6">
|
|
11
11
|
Spec Engine treats a requirement like a <span style="background:var(--acc);color:var(--acc-ink);padding:0 8px" class="astro-j7pv25f6">machined part</span>: stamped with a permanent ID, bound to the code that implements it, and measured continuously for drift.
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
StarlightThemeProvider.updatePickers();
|
|
73
73
|
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-4azfgxa5"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-7dbgj2gg"> <aside class="right-sidebar-container print:hidden astro-7dbgj2gg"> <div class="right-sidebar astro-7dbgj2gg"> <div class="lg:sl-hidden astro-ungkjbep"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-qoe4sryv"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-qoe4sryv"><details id="starlight__mobile-toc" class="astro-qoe4sryv"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-qoe4sryv"><span class="toggle sl-flex astro-qoe4sryv">On this page<svg aria-hidden="true" class="caret astro-qoe4sryv astro-kyfdspn7" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg></span><span class="display-current astro-qoe4sryv"></span></summary><div class="dropdown astro-qoe4sryv"><ul class="isMobile astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#why-it-exists" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Why it exists</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#provenance--the-external-join" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Provenance — the external join</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#deployment-tiers" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Deployment tiers</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#the-four-moves" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">The four moves</span> </a> </li> </ul></div></details></nav></mobile-starlight-toc><script type="module" src="/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.hwBsy0Mo.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-ungkjbep"><div class="sl-container astro-ungkjbep"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-mc3l7tuo" style="--depth: 0;"> <li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#_top" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Overview</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#why-it-exists" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Why it exists</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#provenance--the-external-join" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Provenance — the external join</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#deployment-tiers" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">Deployment tiers</span> </a> </li><li class="astro-mc3l7tuo" style="--depth: 0;"> <a href="#the-four-moves" class="astro-mc3l7tuo" style="--depth: 0;"> <span class="astro-mc3l7tuo" style="--depth: 0;">The four moves</span> </a> </li> </ul></nav></starlight-toc><script type="module" src="/_astro/TableOfContents.astro_astro_type_script_index_0_lang.FuRcXuRY.js"></script></div></div> </div> </aside> <div class="main-pane astro-7dbgj2gg"> <main data-pagefind-body class="astro-hke2hksx" lang="en" dir="ltr"> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <h1 id="_top" class="astro-jkmikw3m">Overview</h1> </div> </div> <div class="content-panel astro-cwqdebiv"> <div class="sl-container astro-cwqdebiv"> <div class="sl-markdown-content"> <starlight-tabs class="astro-kxdxunri"> <div class="tablist-wrapper not-content astro-kxdxunri"> <ul role="tablist" class="astro-kxdxunri"> <li role="presentation" class="tab astro-kxdxunri"> <a role="tab" href="#tab-panel-0" id="tab-0" aria-selected="true" tabindex="0" class="astro-kxdxunri"> 👤 Human </a> </li><li role="presentation" class="tab astro-kxdxunri"> <a role="tab" href="#tab-panel-1" id="tab-1" aria-selected="false" tabindex="-1" class="astro-kxdxunri"> 🤖 Agent </a> </li> </ul> </div> <div id="tab-panel-0" aria-labelledby="tab-0" role="tabpanel"> <p><strong>Start here.</strong> Read <a href="/getting-started/">Getting Started</a> for a walkthrough, then explore <a href="/architecture/">Architecture</a>, <a href="/commands/">Commands</a>, and the <a href="/guides/adoption/">Guides</a>.</p><p>These docs are written in narrative style with rationale, examples, and context.</p> </div><div id="tab-panel-1" aria-labelledby="tab-1" role="tabpanel" hidden> <p><strong>You’re told to “use Spec Engine.”</strong> Go straight to the <a href="/agent-reference/">Agent Reference</a> — it has the exact CLI contracts, exit codes, JSON shapes, and the route → tag → check loop in as few tokens as possible. That page is optimized for agents, not humans.</p> </div> </starlight-tabs> <script type="module">class r extends HTMLElement{static#e=new Map;#t;#n="starlight-synced-tabs__";constructor(){super();const t=this.querySelector('[role="tablist"]');if(this.tabs=[...t.querySelectorAll('[role="tab"]')],this.panels=[...this.querySelectorAll(':scope > [role="tabpanel"]')],this.#t=this.dataset.syncKey,this.#t){const i=r.#e.get(this.#t)??[];i.push(this),r.#e.set(this.#t,i)}this.tabs.forEach((i,c)=>{i.addEventListener("click",e=>{e.preventDefault();const n=t.querySelector('[aria-selected="true"]');e.currentTarget!==n&&this.switchTab(e.currentTarget,c)}),i.addEventListener("keydown",e=>{const n=this.tabs.indexOf(e.currentTarget),s=e.key==="ArrowLeft"?n-1:e.key==="ArrowRight"?n+1:e.key==="Home"?0:e.key==="End"?this.tabs.length-1:null;s!==null&&this.tabs[s]&&(e.preventDefault(),this.switchTab(this.tabs[s],s))})})}switchTab(t,i,c=!0){if(!t)return;const e=c?this.getBoundingClientRect().top:0;this.tabs.forEach(s=>{s.setAttribute("aria-selected","false"),s.setAttribute("tabindex","-1")}),this.panels.forEach(s=>{s.hidden=!0});const n=this.panels[i];n&&(n.hidden=!1),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),c&&(t.focus(),r.#r(this,t),window.scrollTo({top:window.scrollY+(this.getBoundingClientRect().top-e),behavior:"instant"}))}#i(t){!this.#t||typeof localStorage>"u"||localStorage.setItem(this.#n+this.#t,t)}static#r(t,i){const c=t.#t,e=r.#s(i);if(!c||!e)return;const n=r.#e.get(c);if(n){for(const s of n){if(s===t)continue;const a=s.tabs.findIndex(o=>r.#s(o)===e);a!==-1&&s.switchTab(s.tabs[a],a,!1)}t.#i(e)}}static#s(t){return t.textContent?.trim()}}customElements.define("starlight-tabs",r);</script>
|
|
74
74
|
<p>Spec Engine is a cross-repo requirements engine. It manages durable domain requirements that survive past production, addressed by permanent ID, bound to code, and checkable in CI.</p>
|
|
75
|
+
<p>It ships as one npm package — no clone, no build step, no service. With <a href="https://bun.sh">Bun</a> installed:</p>
|
|
76
|
+
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.v4551.css"><script type="module" src="/_astro/ec.0vx5m.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="shell"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">bunx</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">@spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">--help</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># run without installing</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3B61B0">$</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">bun</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">add</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3B61B0">-g</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3B61B0">@spec-engine/spec-engine</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># or put the `spec` bin on your PATH</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copy to clipboard" data-copied="Copied!" data-code="$ bunx @spec-engine/spec-engine --help # run without installing$ bun add -g @spec-engine/spec-engine # or put the `spec` bin on your PATH"><div></div></button></div></figure></div>
|
|
77
|
+
<p>That package carries the CLI, the local coverage webapp (<code dir="auto">spec serve</code>), and these docs offline (<code dir="auto">spec docs</code>). See <a href="/getting-started/">Getting Started</a> to run your first check.</p>
|
|
75
78
|
<p>A <strong>spec</strong> is the standing specification of one domain. Requirements carry permanent IDs (<code dir="auto">KEY-NNN</code>); code points back at them with a <code dir="auto">// @spec KEY-NNN</code> tag. From that one convention you get three things:</p>
|
|
76
79
|
<ol>
|
|
77
80
|
<li>An agent can be routed to exactly the requirements a task touches</li>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.5.2","languages":{"en":{"hash":"
|
|
1
|
+
{"version":"1.5.2","languages":{"en":{"hash":"en_f3a4ba28d6","wasm":"en","page_count":11}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
|
Binary file
|
package/dist/impl.js
CHANGED
|
@@ -10962,7 +10962,7 @@ import { defineCommand as defineCommand23, runMain, showUsage } from "citty";
|
|
|
10962
10962
|
// package.json
|
|
10963
10963
|
var package_default = {
|
|
10964
10964
|
name: "@spec-engine/spec-engine",
|
|
10965
|
-
version: "0.1.
|
|
10965
|
+
version: "0.1.1",
|
|
10966
10966
|
description: "Cross-repo spec engine \u2014 durable requirements with permanent IDs, bound to code via @spec tags, checked in CI. Ships the spec CLI, the local coverage webapp (spec serve), and offline docs (spec docs).",
|
|
10967
10967
|
license: "MIT",
|
|
10968
10968
|
type: "module",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spec-engine/spec-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Cross-repo spec engine — durable requirements with permanent IDs, bound to code via @spec tags, checked in CI. Ships the spec CLI, the local coverage webapp (spec serve), and offline docs (spec docs).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|