openspecui 0.0.0 → 0.2.0
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/cli.mjs +4579 -0
- package/dist/index.mjs +3 -0
- package/dist/open-CmiqsyCQ.mjs +473 -0
- package/dist/src-Bmm_kaB8.mjs +13749 -0
- package/package.json +37 -7
- package/web/assets/index-BhzIZ_eQ.js +150 -0
- package/web/assets/index-D6x5Q1lW.css +1 -0
- package/web/dist/assets/abap-BdImnpbu.js +1 -0
- package/web/dist/assets/actionscript-3-CfeIJUat.js +1 -0
- package/web/dist/assets/ada-bCR0ucgS.js +1 -0
- package/web/dist/assets/andromeeda-C-Jbm3Hp.js +1 -0
- package/web/dist/assets/angular-html-CU67Zn6k.js +1 -0
- package/web/dist/assets/angular-ts-BwZT4LLn.js +1 -0
- package/web/dist/assets/apache-Pmp26Uib.js +1 -0
- package/web/dist/assets/apex-DDbsPZ6N.js +1 -0
- package/web/dist/assets/apl-dKokRX4l.js +1 -0
- package/web/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/web/dist/assets/ara-BRHolxvo.js +1 -0
- package/web/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
- package/web/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/web/dist/assets/astro-CbQHKStN.js +1 -0
- package/web/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/web/dist/assets/awk-DMzUqQB5.js +1 -0
- package/web/dist/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/web/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/web/dist/assets/bat-BkioyH1T.js +1 -0
- package/web/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/web/dist/assets/berry-uYugtg8r.js +1 -0
- package/web/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/web/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/web/dist/assets/blade-DVc8C-J4.js +1 -0
- package/web/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/web/dist/assets/c-BIGW1oBm.js +1 -0
- package/web/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/web/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/web/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/web/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/web/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/web/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/web/dist/assets/clarity-D53aC0YG.js +1 -0
- package/web/dist/assets/clojure-P80f7IUj.js +1 -0
- package/web/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/web/dist/assets/cobol-nwyudZeR.js +1 -0
- package/web/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/web/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/web/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/web/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/web/dist/assets/coq-DkFqJrB1.js +1 -0
- package/web/dist/assets/cpp-CofmeUqb.js +1 -0
- package/web/dist/assets/crystal-tKQVLTB8.js +1 -0
- package/web/dist/assets/csharp-K5feNrxe.js +1 -0
- package/web/dist/assets/css-DPfMkruS.js +1 -0
- package/web/dist/assets/csv-fuZLfV_i.js +1 -0
- package/web/dist/assets/cue-D82EKSYY.js +1 -0
- package/web/dist/assets/cypher-COkxafJQ.js +1 -0
- package/web/dist/assets/d-85-TOEBH.js +1 -0
- package/web/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/web/dist/assets/dart-CF10PKvl.js +1 -0
- package/web/dist/assets/dax-CEL-wOlO.js +1 -0
- package/web/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/web/dist/assets/diff-D97Zzqfu.js +1 -0
- package/web/dist/assets/docker-BcOcwvcX.js +1 -0
- package/web/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/web/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/web/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/web/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/web/dist/assets/edge-BkV0erSs.js +1 -0
- package/web/dist/assets/elixir-CDX3lj18.js +1 -0
- package/web/dist/assets/elm-DbKCFpqz.js +1 -0
- package/web/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/web/dist/assets/erb-BOJIQeun.js +1 -0
- package/web/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/web/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/web/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/web/dist/assets/fennel-BYunw83y.js +1 -0
- package/web/dist/assets/fish-BvzEVeQv.js +1 -0
- package/web/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/web/dist/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
- package/web/dist/assets/fortran-free-form-D22FLkUw.js +1 -0
- package/web/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/web/dist/assets/gdresource-B7Tvp0Sc.js +1 -0
- package/web/dist/assets/gdscript-DTMYz4Jt.js +1 -0
- package/web/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/web/dist/assets/genie-D0YGMca9.js +1 -0
- package/web/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/web/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/web/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/web/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/web/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/web/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/web/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/web/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/web/dist/assets/gleam-BspZqrRM.js +1 -0
- package/web/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/web/dist/assets/glimmer-ts-U6CK756n.js +1 -0
- package/web/dist/assets/glsl-DplSGwfg.js +1 -0
- package/web/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/web/dist/assets/go-Dn2_MT6a.js +1 -0
- package/web/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/web/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/web/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/web/dist/assets/hack-CaT9iCJl.js +1 -0
- package/web/dist/assets/haml-B8DHNrY2.js +1 -0
- package/web/dist/assets/handlebars-BL8al0AC.js +1 -0
- package/web/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/web/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/web/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/web/dist/assets/hjson-D5-asLiD.js +1 -0
- package/web/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/web/dist/assets/houston-DnULxvSX.js +1 -0
- package/web/dist/assets/html-GMplVEZG.js +1 -0
- package/web/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/web/dist/assets/http-jrhK8wxY.js +1 -0
- package/web/dist/assets/hurl-irOxFIW8.js +1 -0
- package/web/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/web/dist/assets/hy-DFXneXwc.js +1 -0
- package/web/dist/assets/imba-DGztddWO.js +1 -0
- package/web/dist/assets/index-BNmb5C1F.css +1 -0
- package/web/dist/assets/index-BhzIZ_eQ.js +150 -0
- package/web/dist/assets/index-BxBbLX3V.js +170 -0
- package/web/dist/assets/index-C4c5ARU5.css +1 -0
- package/web/dist/assets/index-CqKOZnDE.css +1 -0
- package/web/dist/assets/index-D6x5Q1lW.css +1 -0
- package/web/dist/assets/index-Om_P2_SF.js +155 -0
- package/web/dist/assets/index-l4gcUD8y.js +382 -0
- package/web/dist/assets/ini-BEwlwnbL.js +1 -0
- package/web/dist/assets/java-CylS5w8V.js +1 -0
- package/web/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/web/dist/assets/jinja-4LBKfQ-Z.js +1 -0
- package/web/dist/assets/jison-wvAkD_A8.js +1 -0
- package/web/dist/assets/json-Cp-IABpG.js +1 -0
- package/web/dist/assets/json5-C9tS-k6U.js +1 -0
- package/web/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/web/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/web/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/web/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/web/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/web/dist/assets/julia-C8NyazO9.js +1 -0
- package/web/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/web/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/web/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/web/dist/assets/kdl-DV7GczEv.js +1 -0
- package/web/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/web/dist/assets/kusto-BvAqAH-y.js +1 -0
- package/web/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/web/dist/assets/latex-BdAV_C_H.js +1 -0
- package/web/dist/assets/lean-Bc6EcWN3.js +1 -0
- package/web/dist/assets/less-B1dDrJ26.js +1 -0
- package/web/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/web/dist/assets/liquid-DYVedYrR.js +1 -0
- package/web/dist/assets/llvm-BtvRca6l.js +1 -0
- package/web/dist/assets/log-2UxHyX5q.js +1 -0
- package/web/dist/assets/logo-BtOb2qkB.js +1 -0
- package/web/dist/assets/lua-BbnMAYS6.js +1 -0
- package/web/dist/assets/luau-CXu1NL6O.js +1 -0
- package/web/dist/assets/make-CHLpvVh8.js +1 -0
- package/web/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/web/dist/assets/marko-CPi9NSCl.js +1 -0
- package/web/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/web/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/web/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/web/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/web/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/web/dist/assets/matlab-D7o27uSR.js +1 -0
- package/web/dist/assets/mdc-DUICxH0z.js +1 -0
- package/web/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/web/dist/assets/mermaid-DKYwYmdq.js +1 -0
- package/web/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/web/dist/assets/min-light-CTRr51gU.js +1 -0
- package/web/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/web/dist/assets/mojo-1DNp92w6.js +1 -0
- package/web/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/web/dist/assets/move-Bu9oaDYs.js +1 -0
- package/web/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/web/dist/assets/nextflow-BrzmwbiE.js +1 -0
- package/web/dist/assets/nginx-DknmC5AR.js +1 -0
- package/web/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/web/dist/assets/nim-CVrawwO9.js +1 -0
- package/web/dist/assets/nix-c8nO5XWb.js +1 -0
- package/web/dist/assets/nord-Ddv68eIx.js +1 -0
- package/web/dist/assets/nushell-C-sUppwS.js +1 -0
- package/web/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/web/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/web/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/web/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/web/dist/assets/one-light-PoHY5YXO.js +1 -0
- package/web/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/web/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/web/dist/assets/perl-C0TMdlhV.js +1 -0
- package/web/dist/assets/php-CDn_0X-4.js +1 -0
- package/web/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/web/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/web/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/web/dist/assets/po-BTJTHyun.js +1 -0
- package/web/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/web/dist/assets/polar-C0HS_06l.js +1 -0
- package/web/dist/assets/postcss-CXtECtnM.js +1 -0
- package/web/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/web/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/web/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/web/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/web/dist/assets/proto-DyJlTyXw.js +1 -0
- package/web/dist/assets/pug-CGlum2m_.js +1 -0
- package/web/dist/assets/puppet-BMWR74SV.js +1 -0
- package/web/dist/assets/purescript-CklMAg4u.js +1 -0
- package/web/dist/assets/python-B6aJPvgy.js +1 -0
- package/web/dist/assets/qml-3beO22l8.js +1 -0
- package/web/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/web/dist/assets/qss-IeuSbFQv.js +1 -0
- package/web/dist/assets/r-DiinP2Uv.js +1 -0
- package/web/dist/assets/racket-BqYA7rlc.js +1 -0
- package/web/dist/assets/raku-DXvB9xmW.js +1 -0
- package/web/dist/assets/razor-CE9lU5zL.js +1 -0
- package/web/dist/assets/red-bN70gL4F.js +1 -0
- package/web/dist/assets/reg-C-SQnVFl.js +1 -0
- package/web/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/web/dist/assets/rel-C3B-1QV4.js +1 -0
- package/web/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/web/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/web/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/web/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/web/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/web/dist/assets/rst-B0xPkSld.js +1 -0
- package/web/dist/assets/ruby-BvKwtOVI.js +1 -0
- package/web/dist/assets/rust-B1yitclQ.js +1 -0
- package/web/dist/assets/sas-cz2c8ADy.js +1 -0
- package/web/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/web/dist/assets/scala-C151Ov-r.js +1 -0
- package/web/dist/assets/scheme-C98Dy4si.js +1 -0
- package/web/dist/assets/scss-OYdSNvt2.js +1 -0
- package/web/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/web/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/web/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/web/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/web/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/web/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/web/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/web/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/web/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/web/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/web/dist/assets/solidity-rGO070M0.js +1 -0
- package/web/dist/assets/soy-Brmx7dQM.js +1 -0
- package/web/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/web/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/web/dist/assets/sql-BLtJtn59.js +1 -0
- package/web/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/web/dist/assets/stata-BH5u7GGu.js +1 -0
- package/web/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/web/dist/assets/svelte-3Dk4HxPD.js +1 -0
- package/web/dist/assets/swift-Dg5xB15N.js +1 -0
- package/web/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/web/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/web/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/web/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/web/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/web/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/web/dist/assets/templ-W15q3VgB.js +1 -0
- package/web/dist/assets/terraform-BETggiCN.js +1 -0
- package/web/dist/assets/tex-CxkMU7Pf.js +1 -0
- package/web/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/web/dist/assets/toml-vGWfd6FD.js +1 -0
- package/web/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/web/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/web/dist/assets/tsx-COt5Ahok.js +1 -0
- package/web/dist/assets/turtle-BsS91CYL.js +1 -0
- package/web/dist/assets/twig-CO9l9SDP.js +1 -0
- package/web/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/dist/assets/typespec-BGHnOYBU.js +1 -0
- package/web/dist/assets/typst-DHCkPAjA.js +1 -0
- package/web/dist/assets/v-BcVCzyr7.js +1 -0
- package/web/dist/assets/vala-CsfeWuGM.js +1 -0
- package/web/dist/assets/vb-D17OF-Vu.js +1 -0
- package/web/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/web/dist/assets/vesper-DU1UobuO.js +1 -0
- package/web/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/web/dist/assets/viml-CJc9bBzg.js +1 -0
- package/web/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/web/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/web/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/web/dist/assets/vue-DnHKYNfI.js +1 -0
- package/web/dist/assets/vue-html-CChd_i61.js +1 -0
- package/web/dist/assets/vue-vine-8moa0y9V.js +1 -0
- package/web/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/web/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/web/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/web/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/web/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/web/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/web/dist/assets/wit-5i3qLPDT.js +1 -0
- package/web/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/web/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/web/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/web/dist/assets/yaml-Buea-lGh.js +1 -0
- package/web/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/web/dist/assets/zig-VOosw3JB.js +1 -0
- package/web/dist/index.html +14 -0
- package/web/index.html +14 -0
- package/.gitmodules +0 -3
- package/CHAT.md +0 -3
- package/references/openspec/.changeset/README.md +0 -6
- package/references/openspec/.changeset/config.json +0 -12
- package/references/openspec/.coderabbit.yaml +0 -11
- package/references/openspec/.devcontainer/README.md +0 -92
- package/references/openspec/.devcontainer/devcontainer.json +0 -68
- package/references/openspec/.github/CODEOWNERS +0 -2
- package/references/openspec/.github/workflows/ci.yml +0 -222
- package/references/openspec/.github/workflows/release-prepare.yml +0 -50
- package/references/openspec/AGENTS.md +0 -18
- package/references/openspec/CHANGELOG.md +0 -205
- package/references/openspec/LICENSE +0 -22
- package/references/openspec/README.md +0 -374
- package/references/openspec/assets/openspec_dashboard.png +0 -0
- package/references/openspec/assets/openspec_pixel_dark.svg +0 -89
- package/references/openspec/assets/openspec_pixel_light.svg +0 -89
- package/references/openspec/bin/openspec.js +0 -3
- package/references/openspec/build.js +0 -31
- package/references/openspec/openspec/AGENTS.md +0 -454
- package/references/openspec/openspec/changes/IMPLEMENTATION_ORDER.md +0 -68
- package/references/openspec/openspec/changes/add-antigravity-support/proposal.md +0 -11
- package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-init/spec.md +0 -9
- package/references/openspec/openspec/changes/add-antigravity-support/specs/cli-update/spec.md +0 -8
- package/references/openspec/openspec/changes/add-antigravity-support/tasks.md +0 -12
- package/references/openspec/openspec/changes/add-scaffold-command/proposal.md +0 -11
- package/references/openspec/openspec/changes/add-scaffold-command/specs/cli-scaffold/spec.md +0 -36
- package/references/openspec/openspec/changes/add-scaffold-command/tasks.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/design.md +0 -86
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/proposal.md +0 -29
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/specs/cli-update/spec.md +0 -59
- package/references/openspec/openspec/changes/archive/2025-01-11-add-update-command/tasks.md +0 -20
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/proposal.md +0 -20
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/specs/cli-list/spec.md +0 -69
- package/references/openspec/openspec/changes/archive/2025-01-13-add-list-command/tasks.md +0 -26
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/design.md +0 -64
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/proposal.md +0 -18
- package/references/openspec/openspec/changes/archive/2025-08-05-initialize-typescript-project/tasks.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/design.md +0 -104
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/proposal.md +0 -30
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/specs/cli-init/spec.md +0 -148
- package/references/openspec/openspec/changes/archive/2025-08-06-add-init-command/tasks.md +0 -38
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/proposal.md +0 -24
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/specs/openspec-conventions/spec.md +0 -120
- package/references/openspec/openspec/changes/archive/2025-08-06-adopt-future-state-storage/tasks.md +0 -38
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/proposal.md +0 -13
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/specs/openspec-docs/README.md +0 -472
- package/references/openspec/openspec/changes/archive/2025-08-11-add-complexity-guidelines/tasks.md +0 -9
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/proposal.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/specs/cli-archive/spec.md +0 -111
- package/references/openspec/openspec/changes/archive/2025-08-13-add-archive-command/tasks.md +0 -44
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/proposal.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/specs/cli-diff/spec.md +0 -77
- package/references/openspec/openspec/changes/archive/2025-08-13-add-diff-command/tasks.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/design.md +0 -56
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/proposal.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-change/spec.md +0 -48
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/specs/cli-list/spec.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-08-19-add-change-commands/tasks.md +0 -34
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/proposal.md +0 -20
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-change/spec.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-show/spec.md +0 -83
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/specs/cli-spec/spec.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-add-interactive-show-command/tasks.md +0 -142
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/proposal.md +0 -13
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/specs/cli-archive/spec.md +0 -191
- package/references/openspec/openspec/changes/archive/2025-08-19-add-skip-specs-archive-option/tasks.md +0 -57
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/design.md +0 -45
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/proposal.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/specs/cli-spec/spec.md +0 -43
- package/references/openspec/openspec/changes/archive/2025-08-19-add-spec-commands/tasks.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/design.md +0 -104
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/proposal.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-archive/spec.md +0 -18
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/specs/cli-diff/spec.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-08-19-add-zod-validation/tasks.md +0 -59
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/proposal.md +0 -93
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-archive/spec.md +0 -48
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/cli-diff/spec.md +0 -45
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/specs/openspec-conventions/spec.md +0 -101
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-delta-based-changes/tasks.md +0 -55
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/design.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/proposal.md +0 -67
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/cli-list/spec.md +0 -57
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/specs/openspec-conventions/spec.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-adopt-verb-noun-cli-structure/tasks.md +0 -27
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/proposal.md +0 -20
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-change/spec.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-spec/spec.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/specs/cli-validate/spec.md +0 -149
- package/references/openspec/openspec/changes/archive/2025-08-19-bulk-validation-interactive-selection/tasks.md +0 -81
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/proposal.md +0 -40
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/specs/cli-update/spec.md +0 -23
- package/references/openspec/openspec/changes/archive/2025-08-19-fix-update-tool-selection/tasks.md +0 -21
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/proposal.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/specs/cli-validate/spec.md +0 -55
- package/references/openspec/openspec/changes/archive/2025-08-19-improve-validate-error-messages/tasks.md +0 -21
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/proposal.md +0 -36
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/specs/openspec-conventions/spec.md +0 -192
- package/references/openspec/openspec/changes/archive/2025-08-19-structured-spec-format/tasks.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/proposal.md +0 -38
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/specs/cli-view/spec.md +0 -109
- package/references/openspec/openspec/changes/archive/2025-09-12-add-view-dashboard-command/tasks.md +0 -47
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/proposal.md +0 -28
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-init/spec.md +0 -71
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/specs/cli-update/spec.md +0 -41
- package/references/openspec/openspec/changes/archive/2025-09-29-add-agents-md-config/tasks.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/proposal.md +0 -35
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/specs/cli-init/spec.md +0 -45
- package/references/openspec/openspec/changes/archive/2025-09-29-add-multi-agent-init/tasks.md +0 -16
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/proposal.md +0 -119
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-init/spec.md +0 -21
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/specs/cli-update/spec.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-09-29-add-slash-command-support/tasks.md +0 -20
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/proposal.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-cli-e2e-plan/tasks.md +0 -9
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/proposal.md +0 -78
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-deterministic-tests/tasks.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/proposal.md +0 -13
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/specs/cli-init/spec.md +0 -92
- package/references/openspec/openspec/changes/archive/2025-09-29-improve-init-onboarding/tasks.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/proposal.md +0 -81
- package/references/openspec/openspec/changes/archive/2025-09-29-remove-diff-command/tasks.md +0 -37
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/proposal.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/specs/cli-view/spec.md +0 -9
- package/references/openspec/openspec/changes/archive/2025-09-29-sort-active-changes-by-progress/tasks.md +0 -8
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/proposal.md +0 -29
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-init/spec.md +0 -40
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/cli-update/spec.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/specs/openspec-conventions/spec.md +0 -27
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-file-name/tasks.md +0 -22
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/design.md +0 -130
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/proposal.md +0 -117
- package/references/openspec/openspec/changes/archive/2025-09-29-update-agent-instructions/tasks.md +0 -69
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/proposal.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/specs/cli-validate/spec.md +0 -9
- package/references/openspec/openspec/changes/archive/2025-09-29-update-markdown-parser-crlf/tasks.md +0 -11
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/proposal.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-init/spec.md +0 -56
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/specs/cli-update/spec.md +0 -41
- package/references/openspec/openspec/changes/archive/2025-10-14-add-codex-slash-command-support/tasks.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/proposal.md +0 -25
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-init/spec.md +0 -48
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/specs/cli-update/spec.md +0 -48
- package/references/openspec/openspec/changes/archive/2025-10-14-add-github-copilot-prompts/tasks.md +0 -30
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/proposal.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-init/spec.md +0 -43
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/specs/cli-update/spec.md +0 -27
- package/references/openspec/openspec/changes/archive/2025-10-14-add-kilocode-workflows/tasks.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/proposal.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/specs/cli-init/spec.md +0 -39
- package/references/openspec/openspec/changes/archive/2025-10-14-add-non-interactive-init-options/tasks.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/proposal.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-init/spec.md +0 -42
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/specs/cli-update/spec.md +0 -27
- package/references/openspec/openspec/changes/archive/2025-10-14-add-windsurf-workflows/tasks.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/proposal.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/specs/cli-validate/spec.md +0 -39
- package/references/openspec/openspec/changes/archive/2025-10-14-enhance-validation-error-messages/tasks.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/proposal.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/specs/docs-agent-instructions/spec.md +0 -33
- package/references/openspec/openspec/changes/archive/2025-10-14-improve-agent-instruction-usability/tasks.md +0 -11
- package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/proposal.md +0 -13
- package/references/openspec/openspec/changes/archive/2025-10-14-slim-root-agents-file/tasks.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/proposal.md +0 -14
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/specs/cli-init/spec.md +0 -10
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-enter-selection/tasks.md +0 -8
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/proposal.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-init/spec.md +0 -32
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/specs/cli-update/spec.md +0 -10
- package/references/openspec/openspec/changes/archive/2025-10-14-update-cli-init-root-agents/tasks.md +0 -11
- package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/proposal.md +0 -49
- package/references/openspec/openspec/changes/archive/2025-10-14-update-release-automation/tasks.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/proposal.md +0 -17
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/specs/cli-update/spec.md +0 -32
- package/references/openspec/openspec/changes/archive/2025-10-22-add-archive-command-arguments/tasks.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/proposal.md +0 -15
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/specs/cli-init/spec.md +0 -97
- package/references/openspec/openspec/changes/archive/2025-10-22-add-cline-support/tasks.md +0 -19
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/proposal.md +0 -13
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/specs/cli-init/spec.md +0 -67
- package/references/openspec/openspec/changes/archive/2025-10-22-add-crush-support/tasks.md +0 -7
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/proposal.md +0 -12
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-init/spec.md +0 -54
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/specs/cli-update/spec.md +0 -54
- package/references/openspec/openspec/changes/archive/2025-10-22-add-factory-slash-commands/tasks.md +0 -11
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/proposal.md +0 -13
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/specs/cli-init/spec.md +0 -11
- package/references/openspec/openspec/changes/fix-cline-workflows-implementation/tasks.md +0 -13
- package/references/openspec/openspec/changes/make-validation-scope-aware/proposal.md +0 -12
- package/references/openspec/openspec/changes/make-validation-scope-aware/specs/cli-validate/spec.md +0 -25
- package/references/openspec/openspec/changes/make-validation-scope-aware/tasks.md +0 -16
- package/references/openspec/openspec/project.md +0 -53
- package/references/openspec/openspec/specs/cli-archive/spec.md +0 -210
- package/references/openspec/openspec/specs/cli-change/spec.md +0 -91
- package/references/openspec/openspec/specs/cli-init/spec.md +0 -311
- package/references/openspec/openspec/specs/cli-list/spec.md +0 -103
- package/references/openspec/openspec/specs/cli-show/spec.md +0 -85
- package/references/openspec/openspec/specs/cli-spec/spec.md +0 -87
- package/references/openspec/openspec/specs/cli-update/spec.md +0 -190
- package/references/openspec/openspec/specs/cli-validate/spec.md +0 -218
- package/references/openspec/openspec/specs/cli-view/spec.md +0 -105
- package/references/openspec/openspec/specs/docs-agent-instructions/spec.md +0 -38
- package/references/openspec/openspec/specs/openspec-conventions/spec.md +0 -474
- package/references/openspec/openspec-parallel-merge-plan.md +0 -98
- package/references/openspec/package.json +0 -73
- package/references/openspec/pnpm-lock.yaml +0 -2324
- package/references/openspec/scripts/pack-version-check.mjs +0 -111
- package/references/openspec/src/cli/index.ts +0 -253
- package/references/openspec/src/commands/change.ts +0 -291
- package/references/openspec/src/commands/show.ts +0 -139
- package/references/openspec/src/commands/spec.ts +0 -250
- package/references/openspec/src/commands/validate.ts +0 -305
- package/references/openspec/src/core/archive.ts +0 -606
- package/references/openspec/src/core/config.ts +0 -41
- package/references/openspec/src/core/configurators/agents.ts +0 -23
- package/references/openspec/src/core/configurators/base.ts +0 -6
- package/references/openspec/src/core/configurators/claude.ts +0 -23
- package/references/openspec/src/core/configurators/cline.ts +0 -23
- package/references/openspec/src/core/configurators/codebuddy.ts +0 -24
- package/references/openspec/src/core/configurators/costrict.ts +0 -23
- package/references/openspec/src/core/configurators/iflow.ts +0 -23
- package/references/openspec/src/core/configurators/qoder.ts +0 -53
- package/references/openspec/src/core/configurators/qwen.ts +0 -47
- package/references/openspec/src/core/configurators/registry.ts +0 -49
- package/references/openspec/src/core/configurators/slash/amazon-q.ts +0 -51
- package/references/openspec/src/core/configurators/slash/antigravity.ts +0 -28
- package/references/openspec/src/core/configurators/slash/auggie.ts +0 -37
- package/references/openspec/src/core/configurators/slash/base.ts +0 -95
- package/references/openspec/src/core/configurators/slash/claude.ts +0 -42
- package/references/openspec/src/core/configurators/slash/cline.ts +0 -27
- package/references/openspec/src/core/configurators/slash/codebuddy.ts +0 -43
- package/references/openspec/src/core/configurators/slash/codex.ts +0 -126
- package/references/openspec/src/core/configurators/slash/costrict.ts +0 -36
- package/references/openspec/src/core/configurators/slash/crush.ts +0 -42
- package/references/openspec/src/core/configurators/slash/cursor.ts +0 -42
- package/references/openspec/src/core/configurators/slash/factory.ts +0 -41
- package/references/openspec/src/core/configurators/slash/gemini.ts +0 -27
- package/references/openspec/src/core/configurators/slash/github-copilot.ts +0 -39
- package/references/openspec/src/core/configurators/slash/iflow.ts +0 -42
- package/references/openspec/src/core/configurators/slash/kilocode.ts +0 -21
- package/references/openspec/src/core/configurators/slash/opencode.ts +0 -83
- package/references/openspec/src/core/configurators/slash/qoder.ts +0 -84
- package/references/openspec/src/core/configurators/slash/qwen.ts +0 -55
- package/references/openspec/src/core/configurators/slash/registry.ts +0 -81
- package/references/openspec/src/core/configurators/slash/roocode.ts +0 -27
- package/references/openspec/src/core/configurators/slash/toml-base.ts +0 -66
- package/references/openspec/src/core/configurators/slash/windsurf.ts +0 -27
- package/references/openspec/src/core/converters/json-converter.ts +0 -61
- package/references/openspec/src/core/index.ts +0 -2
- package/references/openspec/src/core/init.ts +0 -986
- package/references/openspec/src/core/list.ts +0 -104
- package/references/openspec/src/core/parsers/change-parser.ts +0 -234
- package/references/openspec/src/core/parsers/markdown-parser.ts +0 -237
- package/references/openspec/src/core/parsers/requirement-blocks.ts +0 -234
- package/references/openspec/src/core/schemas/base.schema.ts +0 -20
- package/references/openspec/src/core/schemas/change.schema.ts +0 -42
- package/references/openspec/src/core/schemas/index.ts +0 -20
- package/references/openspec/src/core/schemas/spec.schema.ts +0 -17
- package/references/openspec/src/core/styles/palette.ts +0 -8
- package/references/openspec/src/core/templates/agents-root-stub.ts +0 -16
- package/references/openspec/src/core/templates/agents-template.ts +0 -457
- package/references/openspec/src/core/templates/claude-template.ts +0 -1
- package/references/openspec/src/core/templates/cline-template.ts +0 -1
- package/references/openspec/src/core/templates/costrict-template.ts +0 -1
- package/references/openspec/src/core/templates/index.ts +0 -50
- package/references/openspec/src/core/templates/project-template.ts +0 -38
- package/references/openspec/src/core/templates/slash-command-templates.ts +0 -60
- package/references/openspec/src/core/update.ts +0 -129
- package/references/openspec/src/core/validation/constants.ts +0 -48
- package/references/openspec/src/core/validation/types.ts +0 -19
- package/references/openspec/src/core/validation/validator.ts +0 -448
- package/references/openspec/src/core/view.ts +0 -189
- package/references/openspec/src/index.ts +0 -2
- package/references/openspec/src/utils/file-system.ts +0 -187
- package/references/openspec/src/utils/index.ts +0 -2
- package/references/openspec/src/utils/interactive.ts +0 -7
- package/references/openspec/src/utils/item-discovery.ts +0 -45
- package/references/openspec/src/utils/match.ts +0 -26
- package/references/openspec/src/utils/task-progress.ts +0 -43
- package/references/openspec/test/cli-e2e/basic.test.ts +0 -156
- package/references/openspec/test/commands/change.interactive-show.test.ts +0 -45
- package/references/openspec/test/commands/change.interactive-validate.test.ts +0 -48
- package/references/openspec/test/commands/show.test.ts +0 -123
- package/references/openspec/test/commands/spec.interactive-show.test.ts +0 -44
- package/references/openspec/test/commands/spec.interactive-validate.test.ts +0 -44
- package/references/openspec/test/commands/spec.test.ts +0 -324
- package/references/openspec/test/commands/validate.enriched-output.test.ts +0 -49
- package/references/openspec/test/commands/validate.test.ts +0 -133
- package/references/openspec/test/core/archive.test.ts +0 -680
- package/references/openspec/test/core/commands/change-command.list.test.ts +0 -76
- package/references/openspec/test/core/commands/change-command.show-validate.test.ts +0 -111
- package/references/openspec/test/core/converters/json-converter.test.ts +0 -184
- package/references/openspec/test/core/init.test.ts +0 -1710
- package/references/openspec/test/core/list.test.ts +0 -165
- package/references/openspec/test/core/parsers/change-parser.test.ts +0 -52
- package/references/openspec/test/core/parsers/markdown-parser.test.ts +0 -291
- package/references/openspec/test/core/update.test.ts +0 -1642
- package/references/openspec/test/core/validation.enriched-messages.test.ts +0 -74
- package/references/openspec/test/core/validation.test.ts +0 -489
- package/references/openspec/test/core/view.test.ts +0 -79
- package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/proposal.md +0 -7
- package/references/openspec/test/fixtures/tmp-init/openspec/changes/c1/specs/alpha/spec.md +0 -8
- package/references/openspec/test/fixtures/tmp-init/openspec/specs/alpha/spec.md +0 -12
- package/references/openspec/test/helpers/run-cli.ts +0 -139
- package/references/openspec/test/utils/file-system.test.ts +0 -211
- package/references/openspec/test/utils/marker-updates.test.ts +0 -287
- package/references/openspec/tsconfig.json +0 -21
- package/references/openspec/vitest.config.ts +0 -25
- package/references/openspec/vitest.setup.ts +0 -6
|
@@ -1,606 +0,0 @@
|
|
|
1
|
-
import { promises as fs } from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { select, confirm } from '@inquirer/prompts';
|
|
4
|
-
import { FileSystemUtils } from '../utils/file-system.js';
|
|
5
|
-
import { getTaskProgressForChange, formatTaskStatus } from '../utils/task-progress.js';
|
|
6
|
-
import { Validator } from './validation/validator.js';
|
|
7
|
-
import chalk from 'chalk';
|
|
8
|
-
import {
|
|
9
|
-
extractRequirementsSection,
|
|
10
|
-
parseDeltaSpec,
|
|
11
|
-
normalizeRequirementName,
|
|
12
|
-
type RequirementBlock,
|
|
13
|
-
} from './parsers/requirement-blocks.js';
|
|
14
|
-
|
|
15
|
-
interface SpecUpdate {
|
|
16
|
-
source: string;
|
|
17
|
-
target: string;
|
|
18
|
-
exists: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class ArchiveCommand {
|
|
22
|
-
async execute(
|
|
23
|
-
changeName?: string,
|
|
24
|
-
options: { yes?: boolean; skipSpecs?: boolean; noValidate?: boolean; validate?: boolean } = {}
|
|
25
|
-
): Promise<void> {
|
|
26
|
-
const targetPath = '.';
|
|
27
|
-
const changesDir = path.join(targetPath, 'openspec', 'changes');
|
|
28
|
-
const archiveDir = path.join(changesDir, 'archive');
|
|
29
|
-
const mainSpecsDir = path.join(targetPath, 'openspec', 'specs');
|
|
30
|
-
|
|
31
|
-
// Check if changes directory exists
|
|
32
|
-
try {
|
|
33
|
-
await fs.access(changesDir);
|
|
34
|
-
} catch {
|
|
35
|
-
throw new Error("No OpenSpec changes directory found. Run 'openspec init' first.");
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Get change name interactively if not provided
|
|
39
|
-
if (!changeName) {
|
|
40
|
-
const selectedChange = await this.selectChange(changesDir);
|
|
41
|
-
if (!selectedChange) {
|
|
42
|
-
console.log('No change selected. Aborting.');
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
changeName = selectedChange;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const changeDir = path.join(changesDir, changeName);
|
|
49
|
-
|
|
50
|
-
// Verify change exists
|
|
51
|
-
try {
|
|
52
|
-
const stat = await fs.stat(changeDir);
|
|
53
|
-
if (!stat.isDirectory()) {
|
|
54
|
-
throw new Error(`Change '${changeName}' not found.`);
|
|
55
|
-
}
|
|
56
|
-
} catch {
|
|
57
|
-
throw new Error(`Change '${changeName}' not found.`);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const skipValidation = options.validate === false || options.noValidate === true;
|
|
61
|
-
|
|
62
|
-
// Validate specs and change before archiving
|
|
63
|
-
if (!skipValidation) {
|
|
64
|
-
const validator = new Validator();
|
|
65
|
-
let hasValidationErrors = false;
|
|
66
|
-
|
|
67
|
-
// Validate proposal.md (non-blocking unless strict mode desired in future)
|
|
68
|
-
const changeFile = path.join(changeDir, 'proposal.md');
|
|
69
|
-
try {
|
|
70
|
-
await fs.access(changeFile);
|
|
71
|
-
const changeReport = await validator.validateChange(changeFile);
|
|
72
|
-
// Proposal validation is informative only (do not block archive)
|
|
73
|
-
if (!changeReport.valid) {
|
|
74
|
-
console.log(chalk.yellow(`\nProposal warnings in proposal.md (non-blocking):`));
|
|
75
|
-
for (const issue of changeReport.issues) {
|
|
76
|
-
const symbol = issue.level === 'ERROR' ? '⚠' : (issue.level === 'WARNING' ? '⚠' : 'ℹ');
|
|
77
|
-
console.log(chalk.yellow(` ${symbol} ${issue.message}`));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
} catch {
|
|
81
|
-
// Change file doesn't exist, skip validation
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Validate delta-formatted spec files under the change directory if present
|
|
85
|
-
const changeSpecsDir = path.join(changeDir, 'specs');
|
|
86
|
-
let hasDeltaSpecs = false;
|
|
87
|
-
try {
|
|
88
|
-
const candidates = await fs.readdir(changeSpecsDir, { withFileTypes: true });
|
|
89
|
-
for (const c of candidates) {
|
|
90
|
-
if (c.isDirectory()) {
|
|
91
|
-
try {
|
|
92
|
-
const candidatePath = path.join(changeSpecsDir, c.name, 'spec.md');
|
|
93
|
-
await fs.access(candidatePath);
|
|
94
|
-
const content = await fs.readFile(candidatePath, 'utf-8');
|
|
95
|
-
if (/^##\s+(ADDED|MODIFIED|REMOVED|RENAMED)\s+Requirements/m.test(content)) {
|
|
96
|
-
hasDeltaSpecs = true;
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
} catch {}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
} catch {}
|
|
103
|
-
if (hasDeltaSpecs) {
|
|
104
|
-
const deltaReport = await validator.validateChangeDeltaSpecs(changeDir);
|
|
105
|
-
if (!deltaReport.valid) {
|
|
106
|
-
hasValidationErrors = true;
|
|
107
|
-
console.log(chalk.red(`\nValidation errors in change delta specs:`));
|
|
108
|
-
for (const issue of deltaReport.issues) {
|
|
109
|
-
if (issue.level === 'ERROR') {
|
|
110
|
-
console.log(chalk.red(` ✗ ${issue.message}`));
|
|
111
|
-
} else if (issue.level === 'WARNING') {
|
|
112
|
-
console.log(chalk.yellow(` ⚠ ${issue.message}`));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
if (hasValidationErrors) {
|
|
119
|
-
console.log(chalk.red('\nValidation failed. Please fix the errors before archiving.'));
|
|
120
|
-
console.log(chalk.yellow('To skip validation (not recommended), use --no-validate flag.'));
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
} else {
|
|
124
|
-
// Log warning when validation is skipped
|
|
125
|
-
const timestamp = new Date().toISOString();
|
|
126
|
-
|
|
127
|
-
if (!options.yes) {
|
|
128
|
-
const proceed = await confirm({
|
|
129
|
-
message: chalk.yellow('⚠️ WARNING: Skipping validation may archive invalid specs. Continue? (y/N)'),
|
|
130
|
-
default: false
|
|
131
|
-
});
|
|
132
|
-
if (!proceed) {
|
|
133
|
-
console.log('Archive cancelled.');
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
console.log(chalk.yellow(`\n⚠️ WARNING: Skipping validation may archive invalid specs.`));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
console.log(chalk.yellow(`[${timestamp}] Validation skipped for change: ${changeName}`));
|
|
141
|
-
console.log(chalk.yellow(`Affected files: ${changeDir}`));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Show progress and check for incomplete tasks
|
|
145
|
-
const progress = await getTaskProgressForChange(changesDir, changeName);
|
|
146
|
-
const status = formatTaskStatus(progress);
|
|
147
|
-
console.log(`Task status: ${status}`);
|
|
148
|
-
|
|
149
|
-
const incompleteTasks = Math.max(progress.total - progress.completed, 0);
|
|
150
|
-
if (incompleteTasks > 0) {
|
|
151
|
-
if (!options.yes) {
|
|
152
|
-
const proceed = await confirm({
|
|
153
|
-
message: `Warning: ${incompleteTasks} incomplete task(s) found. Continue?`,
|
|
154
|
-
default: false
|
|
155
|
-
});
|
|
156
|
-
if (!proceed) {
|
|
157
|
-
console.log('Archive cancelled.');
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
} else {
|
|
161
|
-
console.log(`Warning: ${incompleteTasks} incomplete task(s) found. Continuing due to --yes flag.`);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Handle spec updates unless skipSpecs flag is set
|
|
166
|
-
if (options.skipSpecs) {
|
|
167
|
-
console.log('Skipping spec updates (--skip-specs flag provided).');
|
|
168
|
-
} else {
|
|
169
|
-
// Find specs to update
|
|
170
|
-
const specUpdates = await this.findSpecUpdates(changeDir, mainSpecsDir);
|
|
171
|
-
|
|
172
|
-
if (specUpdates.length > 0) {
|
|
173
|
-
console.log('\nSpecs to update:');
|
|
174
|
-
for (const update of specUpdates) {
|
|
175
|
-
const status = update.exists ? 'update' : 'create';
|
|
176
|
-
const capability = path.basename(path.dirname(update.target));
|
|
177
|
-
console.log(` ${capability}: ${status}`);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
let shouldUpdateSpecs = true;
|
|
181
|
-
if (!options.yes) {
|
|
182
|
-
shouldUpdateSpecs = await confirm({
|
|
183
|
-
message: 'Proceed with spec updates?',
|
|
184
|
-
default: true
|
|
185
|
-
});
|
|
186
|
-
if (!shouldUpdateSpecs) {
|
|
187
|
-
console.log('Skipping spec updates. Proceeding with archive.');
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (shouldUpdateSpecs) {
|
|
192
|
-
// Prepare all updates first (validation pass, no writes)
|
|
193
|
-
const prepared: Array<{ update: SpecUpdate; rebuilt: string; counts: { added: number; modified: number; removed: number; renamed: number } }> = [];
|
|
194
|
-
try {
|
|
195
|
-
for (const update of specUpdates) {
|
|
196
|
-
const built = await this.buildUpdatedSpec(update, changeName!);
|
|
197
|
-
prepared.push({ update, rebuilt: built.rebuilt, counts: built.counts });
|
|
198
|
-
}
|
|
199
|
-
} catch (err: any) {
|
|
200
|
-
console.log(String(err.message || err));
|
|
201
|
-
console.log('Aborted. No files were changed.');
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// All validations passed; pre-validate rebuilt full spec and then write files and display counts
|
|
206
|
-
let totals = { added: 0, modified: 0, removed: 0, renamed: 0 };
|
|
207
|
-
for (const p of prepared) {
|
|
208
|
-
const specName = path.basename(path.dirname(p.update.target));
|
|
209
|
-
if (!skipValidation) {
|
|
210
|
-
const report = await new Validator().validateSpecContent(specName, p.rebuilt);
|
|
211
|
-
if (!report.valid) {
|
|
212
|
-
console.log(chalk.red(`\nValidation errors in rebuilt spec for ${specName} (will not write changes):`));
|
|
213
|
-
for (const issue of report.issues) {
|
|
214
|
-
if (issue.level === 'ERROR') console.log(chalk.red(` ✗ ${issue.message}`));
|
|
215
|
-
else if (issue.level === 'WARNING') console.log(chalk.yellow(` ⚠ ${issue.message}`));
|
|
216
|
-
}
|
|
217
|
-
console.log('Aborted. No files were changed.');
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
await this.writeUpdatedSpec(p.update, p.rebuilt, p.counts);
|
|
222
|
-
totals.added += p.counts.added;
|
|
223
|
-
totals.modified += p.counts.modified;
|
|
224
|
-
totals.removed += p.counts.removed;
|
|
225
|
-
totals.renamed += p.counts.renamed;
|
|
226
|
-
}
|
|
227
|
-
console.log(
|
|
228
|
-
`Totals: + ${totals.added}, ~ ${totals.modified}, - ${totals.removed}, → ${totals.renamed}`
|
|
229
|
-
);
|
|
230
|
-
console.log('Specs updated successfully.');
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Create archive directory with date prefix
|
|
236
|
-
const archiveName = `${this.getArchiveDate()}-${changeName}`;
|
|
237
|
-
const archivePath = path.join(archiveDir, archiveName);
|
|
238
|
-
|
|
239
|
-
// Check if archive already exists
|
|
240
|
-
try {
|
|
241
|
-
await fs.access(archivePath);
|
|
242
|
-
throw new Error(`Archive '${archiveName}' already exists.`);
|
|
243
|
-
} catch (error: any) {
|
|
244
|
-
if (error.code !== 'ENOENT') {
|
|
245
|
-
throw error;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
// Create archive directory if needed
|
|
250
|
-
await fs.mkdir(archiveDir, { recursive: true });
|
|
251
|
-
|
|
252
|
-
// Move change to archive
|
|
253
|
-
await fs.rename(changeDir, archivePath);
|
|
254
|
-
|
|
255
|
-
console.log(`Change '${changeName}' archived as '${archiveName}'.`);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
private async selectChange(changesDir: string): Promise<string | null> {
|
|
259
|
-
// Get all directories in changes (excluding archive)
|
|
260
|
-
const entries = await fs.readdir(changesDir, { withFileTypes: true });
|
|
261
|
-
const changeDirs = entries
|
|
262
|
-
.filter(entry => entry.isDirectory() && entry.name !== 'archive')
|
|
263
|
-
.map(entry => entry.name)
|
|
264
|
-
.sort();
|
|
265
|
-
|
|
266
|
-
if (changeDirs.length === 0) {
|
|
267
|
-
console.log('No active changes found.');
|
|
268
|
-
return null;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
// Build choices with progress inline to avoid duplicate lists
|
|
272
|
-
let choices: Array<{ name: string; value: string }> = changeDirs.map(name => ({ name, value: name }));
|
|
273
|
-
try {
|
|
274
|
-
const progressList: Array<{ id: string; status: string }> = [];
|
|
275
|
-
for (const id of changeDirs) {
|
|
276
|
-
const progress = await getTaskProgressForChange(changesDir, id);
|
|
277
|
-
const status = formatTaskStatus(progress);
|
|
278
|
-
progressList.push({ id, status });
|
|
279
|
-
}
|
|
280
|
-
const nameWidth = Math.max(...progressList.map(p => p.id.length));
|
|
281
|
-
choices = progressList.map(p => ({
|
|
282
|
-
name: `${p.id.padEnd(nameWidth)} ${p.status}`,
|
|
283
|
-
value: p.id
|
|
284
|
-
}));
|
|
285
|
-
} catch {
|
|
286
|
-
// If anything fails, fall back to simple names
|
|
287
|
-
choices = changeDirs.map(name => ({ name, value: name }));
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
try {
|
|
291
|
-
const answer = await select({
|
|
292
|
-
message: 'Select a change to archive',
|
|
293
|
-
choices
|
|
294
|
-
});
|
|
295
|
-
return answer;
|
|
296
|
-
} catch (error) {
|
|
297
|
-
// User cancelled (Ctrl+C)
|
|
298
|
-
return null;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// Deprecated: replaced by shared task-progress utilities
|
|
303
|
-
private async checkIncompleteTasks(_tasksPath: string): Promise<number> {
|
|
304
|
-
return 0;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
private async findSpecUpdates(changeDir: string, mainSpecsDir: string): Promise<SpecUpdate[]> {
|
|
308
|
-
const updates: SpecUpdate[] = [];
|
|
309
|
-
const changeSpecsDir = path.join(changeDir, 'specs');
|
|
310
|
-
|
|
311
|
-
try {
|
|
312
|
-
const entries = await fs.readdir(changeSpecsDir, { withFileTypes: true });
|
|
313
|
-
|
|
314
|
-
for (const entry of entries) {
|
|
315
|
-
if (entry.isDirectory()) {
|
|
316
|
-
const specFile = path.join(changeSpecsDir, entry.name, 'spec.md');
|
|
317
|
-
const targetFile = path.join(mainSpecsDir, entry.name, 'spec.md');
|
|
318
|
-
|
|
319
|
-
try {
|
|
320
|
-
await fs.access(specFile);
|
|
321
|
-
|
|
322
|
-
// Check if target exists
|
|
323
|
-
let exists = false;
|
|
324
|
-
try {
|
|
325
|
-
await fs.access(targetFile);
|
|
326
|
-
exists = true;
|
|
327
|
-
} catch {
|
|
328
|
-
exists = false;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
updates.push({
|
|
332
|
-
source: specFile,
|
|
333
|
-
target: targetFile,
|
|
334
|
-
exists
|
|
335
|
-
});
|
|
336
|
-
} catch {
|
|
337
|
-
// Source spec doesn't exist, skip
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
} catch {
|
|
342
|
-
// No specs directory in change
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return updates;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
private async buildUpdatedSpec(update: SpecUpdate, changeName: string): Promise<{ rebuilt: string; counts: { added: number; modified: number; removed: number; renamed: number } }> {
|
|
349
|
-
// Read change spec content (delta-format expected)
|
|
350
|
-
const changeContent = await fs.readFile(update.source, 'utf-8');
|
|
351
|
-
|
|
352
|
-
// Parse deltas from the change spec file
|
|
353
|
-
const plan = parseDeltaSpec(changeContent);
|
|
354
|
-
const specName = path.basename(path.dirname(update.target));
|
|
355
|
-
|
|
356
|
-
// Pre-validate duplicates within sections
|
|
357
|
-
const addedNames = new Set<string>();
|
|
358
|
-
for (const add of plan.added) {
|
|
359
|
-
const name = normalizeRequirementName(add.name);
|
|
360
|
-
if (addedNames.has(name)) {
|
|
361
|
-
throw new Error(
|
|
362
|
-
`${specName} validation failed - duplicate requirement in ADDED for header "### Requirement: ${add.name}"`
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
|
-
addedNames.add(name);
|
|
366
|
-
}
|
|
367
|
-
const modifiedNames = new Set<string>();
|
|
368
|
-
for (const mod of plan.modified) {
|
|
369
|
-
const name = normalizeRequirementName(mod.name);
|
|
370
|
-
if (modifiedNames.has(name)) {
|
|
371
|
-
throw new Error(
|
|
372
|
-
`${specName} validation failed - duplicate requirement in MODIFIED for header "### Requirement: ${mod.name}"`
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
modifiedNames.add(name);
|
|
376
|
-
}
|
|
377
|
-
const removedNamesSet = new Set<string>();
|
|
378
|
-
for (const rem of plan.removed) {
|
|
379
|
-
const name = normalizeRequirementName(rem);
|
|
380
|
-
if (removedNamesSet.has(name)) {
|
|
381
|
-
throw new Error(
|
|
382
|
-
`${specName} validation failed - duplicate requirement in REMOVED for header "### Requirement: ${rem}"`
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
removedNamesSet.add(name);
|
|
386
|
-
}
|
|
387
|
-
const renamedFromSet = new Set<string>();
|
|
388
|
-
const renamedToSet = new Set<string>();
|
|
389
|
-
for (const { from, to } of plan.renamed) {
|
|
390
|
-
const fromNorm = normalizeRequirementName(from);
|
|
391
|
-
const toNorm = normalizeRequirementName(to);
|
|
392
|
-
if (renamedFromSet.has(fromNorm)) {
|
|
393
|
-
throw new Error(
|
|
394
|
-
`${specName} validation failed - duplicate FROM in RENAMED for header "### Requirement: ${from}"`
|
|
395
|
-
);
|
|
396
|
-
}
|
|
397
|
-
if (renamedToSet.has(toNorm)) {
|
|
398
|
-
throw new Error(
|
|
399
|
-
`${specName} validation failed - duplicate TO in RENAMED for header "### Requirement: ${to}"`
|
|
400
|
-
);
|
|
401
|
-
}
|
|
402
|
-
renamedFromSet.add(fromNorm);
|
|
403
|
-
renamedToSet.add(toNorm);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
// Pre-validate cross-section conflicts
|
|
407
|
-
const conflicts: Array<{ name: string; a: string; b: string }> = [];
|
|
408
|
-
for (const n of modifiedNames) {
|
|
409
|
-
if (removedNamesSet.has(n)) conflicts.push({ name: n, a: 'MODIFIED', b: 'REMOVED' });
|
|
410
|
-
if (addedNames.has(n)) conflicts.push({ name: n, a: 'MODIFIED', b: 'ADDED' });
|
|
411
|
-
}
|
|
412
|
-
for (const n of addedNames) {
|
|
413
|
-
if (removedNamesSet.has(n)) conflicts.push({ name: n, a: 'ADDED', b: 'REMOVED' });
|
|
414
|
-
}
|
|
415
|
-
// Renamed interplay: MODIFIED must reference the NEW header, not FROM
|
|
416
|
-
for (const { from, to } of plan.renamed) {
|
|
417
|
-
const fromNorm = normalizeRequirementName(from);
|
|
418
|
-
const toNorm = normalizeRequirementName(to);
|
|
419
|
-
if (modifiedNames.has(fromNorm)) {
|
|
420
|
-
throw new Error(
|
|
421
|
-
`${specName} validation failed - when a rename exists, MODIFIED must reference the NEW header "### Requirement: ${to}"`
|
|
422
|
-
);
|
|
423
|
-
}
|
|
424
|
-
// Detect ADDED colliding with a RENAMED TO
|
|
425
|
-
if (addedNames.has(toNorm)) {
|
|
426
|
-
throw new Error(
|
|
427
|
-
`${specName} validation failed - RENAMED TO header collides with ADDED for "### Requirement: ${to}"`
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
if (conflicts.length > 0) {
|
|
432
|
-
const c = conflicts[0];
|
|
433
|
-
throw new Error(
|
|
434
|
-
`${specName} validation failed - requirement present in multiple sections (${c.a} and ${c.b}) for header "### Requirement: ${c.name}"`
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
const hasAnyDelta = (plan.added.length + plan.modified.length + plan.removed.length + plan.renamed.length) > 0;
|
|
438
|
-
if (!hasAnyDelta) {
|
|
439
|
-
throw new Error(
|
|
440
|
-
`Delta parsing found no operations for ${path.basename(path.dirname(update.source))}. ` +
|
|
441
|
-
`Provide ADDED/MODIFIED/REMOVED/RENAMED sections in change spec.`
|
|
442
|
-
);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// Load or create base target content
|
|
446
|
-
let targetContent: string;
|
|
447
|
-
try {
|
|
448
|
-
targetContent = await fs.readFile(update.target, 'utf-8');
|
|
449
|
-
} catch {
|
|
450
|
-
// Target spec does not exist; only ADDED operations are permitted
|
|
451
|
-
if (plan.modified.length > 0 || plan.removed.length > 0 || plan.renamed.length > 0) {
|
|
452
|
-
throw new Error(
|
|
453
|
-
`${specName}: target spec does not exist; only ADDED requirements are allowed for new specs.`
|
|
454
|
-
);
|
|
455
|
-
}
|
|
456
|
-
targetContent = this.buildSpecSkeleton(specName, changeName);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
// Extract requirements section and build name->block map
|
|
460
|
-
const parts = extractRequirementsSection(targetContent);
|
|
461
|
-
const nameToBlock = new Map<string, RequirementBlock>();
|
|
462
|
-
for (const block of parts.bodyBlocks) {
|
|
463
|
-
nameToBlock.set(normalizeRequirementName(block.name), block);
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
// Apply operations in order: RENAMED → REMOVED → MODIFIED → ADDED
|
|
467
|
-
// RENAMED
|
|
468
|
-
for (const r of plan.renamed) {
|
|
469
|
-
const from = normalizeRequirementName(r.from);
|
|
470
|
-
const to = normalizeRequirementName(r.to);
|
|
471
|
-
if (!nameToBlock.has(from)) {
|
|
472
|
-
throw new Error(
|
|
473
|
-
`${specName} RENAMED failed for header "### Requirement: ${r.from}" - source not found`
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
if (nameToBlock.has(to)) {
|
|
477
|
-
throw new Error(
|
|
478
|
-
`${specName} RENAMED failed for header "### Requirement: ${r.to}" - target already exists`
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
const block = nameToBlock.get(from)!;
|
|
482
|
-
const newHeader = `### Requirement: ${to}`;
|
|
483
|
-
const rawLines = block.raw.split('\n');
|
|
484
|
-
rawLines[0] = newHeader;
|
|
485
|
-
const renamedBlock: RequirementBlock = {
|
|
486
|
-
headerLine: newHeader,
|
|
487
|
-
name: to,
|
|
488
|
-
raw: rawLines.join('\n'),
|
|
489
|
-
};
|
|
490
|
-
nameToBlock.delete(from);
|
|
491
|
-
nameToBlock.set(to, renamedBlock);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
// REMOVED
|
|
495
|
-
for (const name of plan.removed) {
|
|
496
|
-
const key = normalizeRequirementName(name);
|
|
497
|
-
if (!nameToBlock.has(key)) {
|
|
498
|
-
throw new Error(
|
|
499
|
-
`${specName} REMOVED failed for header "### Requirement: ${name}" - not found`
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
nameToBlock.delete(key);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
// MODIFIED
|
|
506
|
-
for (const mod of plan.modified) {
|
|
507
|
-
const key = normalizeRequirementName(mod.name);
|
|
508
|
-
if (!nameToBlock.has(key)) {
|
|
509
|
-
throw new Error(
|
|
510
|
-
`${specName} MODIFIED failed for header "### Requirement: ${mod.name}" - not found`
|
|
511
|
-
);
|
|
512
|
-
}
|
|
513
|
-
// Replace block with provided raw (ensure header line matches key)
|
|
514
|
-
const modHeaderMatch = mod.raw.split('\n')[0].match(/^###\s*Requirement:\s*(.+)\s*$/);
|
|
515
|
-
if (!modHeaderMatch || normalizeRequirementName(modHeaderMatch[1]) !== key) {
|
|
516
|
-
throw new Error(
|
|
517
|
-
`${specName} MODIFIED failed for header "### Requirement: ${mod.name}" - header mismatch in content`
|
|
518
|
-
);
|
|
519
|
-
}
|
|
520
|
-
nameToBlock.set(key, mod);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// ADDED
|
|
524
|
-
for (const add of plan.added) {
|
|
525
|
-
const key = normalizeRequirementName(add.name);
|
|
526
|
-
if (nameToBlock.has(key)) {
|
|
527
|
-
throw new Error(
|
|
528
|
-
`${specName} ADDED failed for header "### Requirement: ${add.name}" - already exists`
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
nameToBlock.set(key, add);
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
// Duplicates within resulting map are implicitly prevented by key uniqueness.
|
|
535
|
-
|
|
536
|
-
// Recompose requirements section preserving original ordering where possible
|
|
537
|
-
const keptOrder: RequirementBlock[] = [];
|
|
538
|
-
const seen = new Set<string>();
|
|
539
|
-
for (const block of parts.bodyBlocks) {
|
|
540
|
-
const key = normalizeRequirementName(block.name);
|
|
541
|
-
const replacement = nameToBlock.get(key);
|
|
542
|
-
if (replacement) {
|
|
543
|
-
keptOrder.push(replacement);
|
|
544
|
-
seen.add(key);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
// Append any newly added that were not in original order
|
|
548
|
-
for (const [key, block] of nameToBlock.entries()) {
|
|
549
|
-
if (!seen.has(key)) {
|
|
550
|
-
keptOrder.push(block);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
const reqBody = [
|
|
555
|
-
parts.preamble && parts.preamble.trim() ? parts.preamble.trimEnd() : ''
|
|
556
|
-
]
|
|
557
|
-
.filter(Boolean)
|
|
558
|
-
.concat(keptOrder.map(b => b.raw))
|
|
559
|
-
.join('\n\n')
|
|
560
|
-
.trimEnd();
|
|
561
|
-
|
|
562
|
-
const rebuilt = [
|
|
563
|
-
parts.before.trimEnd(),
|
|
564
|
-
parts.headerLine,
|
|
565
|
-
reqBody,
|
|
566
|
-
parts.after
|
|
567
|
-
]
|
|
568
|
-
.filter((s, idx) => !(idx === 0 && s === ''))
|
|
569
|
-
.join('\n')
|
|
570
|
-
.replace(/\n{3,}/g, '\n\n');
|
|
571
|
-
|
|
572
|
-
return {
|
|
573
|
-
rebuilt,
|
|
574
|
-
counts: {
|
|
575
|
-
added: plan.added.length,
|
|
576
|
-
modified: plan.modified.length,
|
|
577
|
-
removed: plan.removed.length,
|
|
578
|
-
renamed: plan.renamed.length,
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
private async writeUpdatedSpec(update: SpecUpdate, rebuilt: string, counts: { added: number; modified: number; removed: number; renamed: number }): Promise<void> {
|
|
584
|
-
// Create target directory if needed
|
|
585
|
-
const targetDir = path.dirname(update.target);
|
|
586
|
-
await fs.mkdir(targetDir, { recursive: true });
|
|
587
|
-
await fs.writeFile(update.target, rebuilt);
|
|
588
|
-
|
|
589
|
-
const specName = path.basename(path.dirname(update.target));
|
|
590
|
-
console.log(`Applying changes to openspec/specs/${specName}/spec.md:`);
|
|
591
|
-
if (counts.added) console.log(` + ${counts.added} added`);
|
|
592
|
-
if (counts.modified) console.log(` ~ ${counts.modified} modified`);
|
|
593
|
-
if (counts.removed) console.log(` - ${counts.removed} removed`);
|
|
594
|
-
if (counts.renamed) console.log(` → ${counts.renamed} renamed`);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
private buildSpecSkeleton(specFolderName: string, changeName: string): string {
|
|
598
|
-
const titleBase = specFolderName;
|
|
599
|
-
return `# ${titleBase} Specification\n\n## Purpose\nTBD - created by archiving change ${changeName}. Update Purpose after archive.\n\n## Requirements\n`;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
private getArchiveDate(): string {
|
|
603
|
-
// Returns date in YYYY-MM-DD format
|
|
604
|
-
return new Date().toISOString().split('T')[0];
|
|
605
|
-
}
|
|
606
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export const OPENSPEC_DIR_NAME = 'openspec';
|
|
2
|
-
|
|
3
|
-
export const OPENSPEC_MARKERS = {
|
|
4
|
-
start: '<!-- OPENSPEC:START -->',
|
|
5
|
-
end: '<!-- OPENSPEC:END -->'
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export interface OpenSpecConfig {
|
|
9
|
-
aiTools: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface AIToolOption {
|
|
13
|
-
name: string;
|
|
14
|
-
value: string;
|
|
15
|
-
available: boolean;
|
|
16
|
-
successLabel?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const AI_TOOLS: AIToolOption[] = [
|
|
20
|
-
{ name: 'Amazon Q Developer', value: 'amazon-q', available: true, successLabel: 'Amazon Q Developer' },
|
|
21
|
-
{ name: 'Antigravity', value: 'antigravity', available: true, successLabel: 'Antigravity' },
|
|
22
|
-
{ name: 'Auggie (Augment CLI)', value: 'auggie', available: true, successLabel: 'Auggie' },
|
|
23
|
-
{ name: 'Claude Code', value: 'claude', available: true, successLabel: 'Claude Code' },
|
|
24
|
-
{ name: 'Cline', value: 'cline', available: true, successLabel: 'Cline' },
|
|
25
|
-
{ name: 'Codex', value: 'codex', available: true, successLabel: 'Codex' },
|
|
26
|
-
{ name: 'CodeBuddy Code (CLI)', value: 'codebuddy', available: true, successLabel: 'CodeBuddy Code' },
|
|
27
|
-
{ name: 'CoStrict', value: 'costrict', available: true, successLabel: 'CoStrict' },
|
|
28
|
-
{ name: 'Crush', value: 'crush', available: true, successLabel: 'Crush' },
|
|
29
|
-
{ name: 'Cursor', value: 'cursor', available: true, successLabel: 'Cursor' },
|
|
30
|
-
{ name: 'Factory Droid', value: 'factory', available: true, successLabel: 'Factory Droid' },
|
|
31
|
-
{ name: 'Gemini CLI', value: 'gemini', available: true, successLabel: 'Gemini CLI' },
|
|
32
|
-
{ name: 'GitHub Copilot', value: 'github-copilot', available: true, successLabel: 'GitHub Copilot' },
|
|
33
|
-
{ name: 'iFlow', value: 'iflow', available: true, successLabel: 'iFlow' },
|
|
34
|
-
{ name: 'Kilo Code', value: 'kilocode', available: true, successLabel: 'Kilo Code' },
|
|
35
|
-
{ name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode' },
|
|
36
|
-
{ name: 'Qoder (CLI)', value: 'qoder', available: true, successLabel: 'Qoder' },
|
|
37
|
-
{ name: 'Qwen Code', value: 'qwen', available: true, successLabel: 'Qwen Code' },
|
|
38
|
-
{ name: 'RooCode', value: 'roocode', available: true, successLabel: 'RooCode' },
|
|
39
|
-
{ name: 'Windsurf', value: 'windsurf', available: true, successLabel: 'Windsurf' },
|
|
40
|
-
{ name: 'AGENTS.md (works with Amp, VS Code, …)', value: 'agents', available: false, successLabel: 'your AGENTS.md-compatible assistant' }
|
|
41
|
-
];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { ToolConfigurator } from './base.js';
|
|
3
|
-
import { FileSystemUtils } from '../../utils/file-system.js';
|
|
4
|
-
import { TemplateManager } from '../templates/index.js';
|
|
5
|
-
import { OPENSPEC_MARKERS } from '../config.js';
|
|
6
|
-
|
|
7
|
-
export class AgentsStandardConfigurator implements ToolConfigurator {
|
|
8
|
-
name = 'AGENTS.md standard';
|
|
9
|
-
configFileName = 'AGENTS.md';
|
|
10
|
-
isAvailable = true;
|
|
11
|
-
|
|
12
|
-
async configure(projectPath: string, _openspecDir: string): Promise<void> {
|
|
13
|
-
const filePath = path.join(projectPath, this.configFileName);
|
|
14
|
-
const content = TemplateManager.getAgentsStandardTemplate();
|
|
15
|
-
|
|
16
|
-
await FileSystemUtils.updateFileWithMarkers(
|
|
17
|
-
filePath,
|
|
18
|
-
content,
|
|
19
|
-
OPENSPEC_MARKERS.start,
|
|
20
|
-
OPENSPEC_MARKERS.end
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
}
|