specrails-desktop 2.0.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/.claude/commands/specrails/batch-implement.md +287 -0
- package/.claude/commands/specrails/compat-check.md +271 -0
- package/.claude/commands/specrails/doctor.md +62 -0
- package/.claude/commands/specrails/enrich.md +1635 -0
- package/.claude/commands/specrails/explore-spec.md +173 -0
- package/.claude/commands/specrails/health-check.md +527 -0
- package/.claude/commands/specrails/implement.md +1457 -0
- package/.claude/commands/specrails/memory-inspect.md +259 -0
- package/.claude/commands/specrails/opsx-diff.md +419 -0
- package/.claude/commands/specrails/propose-spec.md +102 -0
- package/.claude/commands/specrails/reconfig.md +89 -0
- package/.claude/commands/specrails/refactor-recommender.md +212 -0
- package/.claude/commands/specrails/retry.md +363 -0
- package/.claude/commands/specrails/telemetry.md +552 -0
- package/.claude/commands/specrails/why.md +96 -0
- package/LICENSE +21 -0
- package/README.md +290 -0
- package/cli/dist/specrails-desktop.js +1098 -0
- package/client/dist/assets/ActivityFeedPage-Gy4x8dBt.js +1 -0
- package/client/dist/assets/AgentsPage-CPgu--Fb.js +86 -0
- package/client/dist/assets/AnalyticsPage-B5sJEee2.js +1 -0
- package/client/dist/assets/BarChart-7IMQ8HY1.js +33 -0
- package/client/dist/assets/CodePage-CBdFvbwe.js +2 -0
- package/client/dist/assets/DesktopAnalyticsPage-w0rdTq4w.js +1 -0
- package/client/dist/assets/DocsDialog-BZUYM7wm.js +11 -0
- package/client/dist/assets/DocsPage-9QglWl46.js +11 -0
- package/client/dist/assets/ExportDropdown-BLZFXtNi.js +1 -0
- package/client/dist/assets/IntegrationsPage-BxBE4y99.js +3 -0
- package/client/dist/assets/JobDetailPage-DydWx_5S.js +16 -0
- package/client/dist/assets/JobsPage-20ibw0IO.js +1 -0
- package/client/dist/assets/abap-Bw6f2wDG.js +1 -0
- package/client/dist/assets/activity-BEIp_Y1A.js +1 -0
- package/client/dist/assets/activity-BdrPln96.js +1 -0
- package/client/dist/assets/activity-CpkRS8Sx.js +1 -0
- package/client/dist/assets/activity-DKCpESPt.js +1 -0
- package/client/dist/assets/activity-DOUVEjJi.js +1 -0
- package/client/dist/assets/activity-DRwkql_y.js +1 -0
- package/client/dist/assets/activity-DcDQ7tjw.js +1 -0
- package/client/dist/assets/activity-Dv6H7wEr.js +1 -0
- package/client/dist/assets/addon-image-3WCl5Vhd.js +1 -0
- package/client/dist/assets/addon-ligatures-C5OdliKs.js +2 -0
- package/client/dist/assets/addon-webgl-BbX6pSjl.js +44 -0
- package/client/dist/assets/addspec-B5yl4Loj.js +1 -0
- package/client/dist/assets/addspec-BEeF5-zc.js +1 -0
- package/client/dist/assets/addspec-D33ocMxf.js +1 -0
- package/client/dist/assets/addspec-DFswZ0jK.js +1 -0
- package/client/dist/assets/addspec-DRE-jZv7.js +1 -0
- package/client/dist/assets/addspec-DVZ15Jp8.js +1 -0
- package/client/dist/assets/addspec-Fkv91Opc.js +1 -0
- package/client/dist/assets/addspec-GWm4ffKl.js +1 -0
- package/client/dist/assets/agents-1nCDWRmP.js +1 -0
- package/client/dist/assets/agents-Bm9rPqnt.js +1 -0
- package/client/dist/assets/agents-CMxtJMLD.js +1 -0
- package/client/dist/assets/agents-DK-Dlc0i.js +1 -0
- package/client/dist/assets/agents-Q6Ldfpxx.js +1 -0
- package/client/dist/assets/agents-TeOSy-ax.js +1 -0
- package/client/dist/assets/agents-iTqjRajS.js +1 -0
- package/client/dist/assets/agents-s87sMGzL.js +1 -0
- package/client/dist/assets/agentstudio-B6Wb59E7.js +1 -0
- package/client/dist/assets/agentstudio-BADhZ41e.js +1 -0
- package/client/dist/assets/agentstudio-BSnWLR63.js +1 -0
- package/client/dist/assets/agentstudio-BdidyBzZ.js +1 -0
- package/client/dist/assets/agentstudio-CxlUllqI.js +1 -0
- package/client/dist/assets/agentstudio-D3I62TLJ.js +1 -0
- package/client/dist/assets/agentstudio-DuH9TogZ.js +1 -0
- package/client/dist/assets/agentstudio-Kw88_dUF.js +1 -0
- package/client/dist/assets/aiedit-BWxHGsYA.js +1 -0
- package/client/dist/assets/aiedit-D2ji6Qy0.js +1 -0
- package/client/dist/assets/aiedit-DAhZTvtk.js +1 -0
- package/client/dist/assets/aiedit-DJMny-D5.js +1 -0
- package/client/dist/assets/aiedit-DOcxERkU.js +1 -0
- package/client/dist/assets/aiedit-DvrcbwGv.js +1 -0
- package/client/dist/assets/aiedit-TTwzL1TS.js +1 -0
- package/client/dist/assets/aiedit-WBSjT_C1.js +1 -0
- package/client/dist/assets/analytics-BIdr0YfL.js +1 -0
- package/client/dist/assets/analytics-C6EzgtdE.js +1 -0
- package/client/dist/assets/analytics-C9Zc-rkM.js +1 -0
- package/client/dist/assets/analytics-CVx3YOc0.js +1 -0
- package/client/dist/assets/analytics-CYj0tfj7.js +1 -0
- package/client/dist/assets/analytics-CnY4kNG3.js +1 -0
- package/client/dist/assets/analytics-CrPCZRJ-.js +1 -0
- package/client/dist/assets/analytics-DMCto-TF.js +1 -0
- package/client/dist/assets/apex-Cw8_REBo.js +1 -0
- package/client/dist/assets/atom-one-dark-B-oHczHB.css +1 -0
- package/client/dist/assets/attachments-BIsSSnHJ.js +1 -0
- package/client/dist/assets/attachments-BW4L3l2L.js +1 -0
- package/client/dist/assets/attachments-Bcf6BG6V.js +1 -0
- package/client/dist/assets/attachments-Bke8sCU4.js +1 -0
- package/client/dist/assets/attachments-COcrGRFz.js +1 -0
- package/client/dist/assets/attachments-DYHGA2Dj.js +1 -0
- package/client/dist/assets/attachments-Dd92KpUH.js +1 -0
- package/client/dist/assets/attachments-DzdU6DV6.js +1 -0
- package/client/dist/assets/azcli-Cz6HAoOw.js +1 -0
- package/client/dist/assets/bat-CcJ-xyqL.js +1 -0
- package/client/dist/assets/bicep-z1WDCKYz.js +2 -0
- package/client/dist/assets/browser-5ErDlJoR.js +1 -0
- package/client/dist/assets/browser-Bc-YdlVg.js +1 -0
- package/client/dist/assets/browser-BlYF4OOq.js +1 -0
- package/client/dist/assets/browser-CT-ReZGt.js +1 -0
- package/client/dist/assets/browser-DGITz3fC.js +1 -0
- package/client/dist/assets/browser-JsAIGCEW.js +1 -0
- package/client/dist/assets/browser-M5-rbPlw.js +1 -0
- package/client/dist/assets/browser-Qya9cARy.js +1 -0
- package/client/dist/assets/cameligo-BRewOpfa.js +1 -0
- package/client/dist/assets/chat-BEGuC03z.js +1 -0
- package/client/dist/assets/chat-BEW60P_u.js +1 -0
- package/client/dist/assets/chat-BQNMD0PL.js +1 -0
- package/client/dist/assets/chat-BsbNGPW9.js +1 -0
- package/client/dist/assets/chat-CboQguCi.js +1 -0
- package/client/dist/assets/chat-DRCa9pOt.js +1 -0
- package/client/dist/assets/chat-DwUm6W9z.js +1 -0
- package/client/dist/assets/chat-yoXwguQu.js +1 -0
- package/client/dist/assets/chunk-CilyBKbf.js +1 -0
- package/client/dist/assets/clojure-DBjRWN6g.js +1 -0
- package/client/dist/assets/clsx-DnqN-uhr.js +1 -0
- package/client/dist/assets/code-AL1rVIMb.js +1 -0
- package/client/dist/assets/code-C0BKpkht.js +1 -0
- package/client/dist/assets/code-C0FTS3ew.js +1 -0
- package/client/dist/assets/code-CPcHxzxw.js +1 -0
- package/client/dist/assets/code-D3ryDniw.js +1 -0
- package/client/dist/assets/code-D3zVVQTj.js +1 -0
- package/client/dist/assets/code-PCmfS3dn.js +1 -0
- package/client/dist/assets/code-exI0G5Wd.js +1 -0
- package/client/dist/assets/codicon-ngg6Pgfi.ttf +0 -0
- package/client/dist/assets/coffee-Cfk_XHGR.js +1 -0
- package/client/dist/assets/commands-B772IyDa.js +1 -0
- package/client/dist/assets/commands-BDDp6xFG.js +1 -0
- package/client/dist/assets/commands-CJxCry-o.js +1 -0
- package/client/dist/assets/commands-CfgY-_of.js +1 -0
- package/client/dist/assets/commands-DLrvnPNg.js +1 -0
- package/client/dist/assets/commands-IXMOKBYt.js +1 -0
- package/client/dist/assets/commands-UD1NzmwX.js +1 -0
- package/client/dist/assets/commands-sqrqsxyE.js +1 -0
- package/client/dist/assets/common-DCr6VzJ7.js +1 -0
- package/client/dist/assets/common-Dard9UNH.js +1 -0
- package/client/dist/assets/common-DeDELLZJ.js +1 -0
- package/client/dist/assets/common-DltqHaAe.js +1 -0
- package/client/dist/assets/common-Dmm1GhdD.js +1 -0
- package/client/dist/assets/common-DnjcgkPH.js +1 -0
- package/client/dist/assets/common-GbpxfPG8.js +1 -0
- package/client/dist/assets/common-wA36jmj1.js +1 -0
- package/client/dist/assets/cpp-BVob6BaP.js +1 -0
- package/client/dist/assets/csharp-C4fbRuOu.js +1 -0
- package/client/dist/assets/csp-DthFP_vT.js +1 -0
- package/client/dist/assets/css-CGMH0hcW.js +3 -0
- package/client/dist/assets/css.worker-Wv5dxAWO.js +89 -0
- package/client/dist/assets/cssMode-Cc6ozl-J.js +1 -0
- package/client/dist/assets/cypher-Pnf68BRV.js +1 -0
- package/client/dist/assets/dart-PMMOtxZX.js +1 -0
- package/client/dist/assets/dashboard-B4ixDVk8.js +1 -0
- package/client/dist/assets/dashboard-BZBADHSj.js +1 -0
- package/client/dist/assets/dashboard-C1MfeUHs.js +1 -0
- package/client/dist/assets/dashboard-C7SK6xu5.js +1 -0
- package/client/dist/assets/dashboard-CB6Le1yN.js +1 -0
- package/client/dist/assets/dashboard-CoTpMOBM.js +1 -0
- package/client/dist/assets/dashboard-Duo4DDCW.js +1 -0
- package/client/dist/assets/dashboard-I19DXBxw.js +1 -0
- package/client/dist/assets/dist-js-BY-Fv_fg.js +1 -0
- package/client/dist/assets/dist-js-Bakc4uxT.js +1 -0
- package/client/dist/assets/dockerfile-di1nsJCc.js +1 -0
- package/client/dist/assets/ecl-D_WVcB5M.js +1 -0
- package/client/dist/assets/editor-Br_kD0ds.css +1 -0
- package/client/dist/assets/editor.api2-XLGzZfbc.js +872 -0
- package/client/dist/assets/editor.main-CfXxHimg.js +6 -0
- package/client/dist/assets/editor.worker-Bd9IXS8d.js +26 -0
- package/client/dist/assets/elixir-OAdJEMOn.js +1 -0
- package/client/dist/assets/explore-4mFpnrKU.js +1 -0
- package/client/dist/assets/explore-A8Ltoblq.js +1 -0
- package/client/dist/assets/explore-B9A3iN2W.js +1 -0
- package/client/dist/assets/explore-BV5Xxlsn.js +1 -0
- package/client/dist/assets/explore-BrBJvfjP.js +1 -0
- package/client/dist/assets/explore-C3FSE42C.js +1 -0
- package/client/dist/assets/explore-D2EFgt8J.js +1 -0
- package/client/dist/assets/explore-hFc3HFcp.js +1 -0
- package/client/dist/assets/flow9-D3QEZjgn.js +1 -0
- package/client/dist/assets/format-command-CwGuwzGA.js +1 -0
- package/client/dist/assets/freemarker2-DP7J1gG3.js +3 -0
- package/client/dist/assets/fsharp-BF0k_8N8.js +1 -0
- package/client/dist/assets/go-BAQO5Jsz.js +1 -0
- package/client/dist/assets/graphql-hdFVFkiV.js +1 -0
- package/client/dist/assets/handlebars-BjRlucw6.js +1 -0
- package/client/dist/assets/hcl-DWnl1o-X.js +1 -0
- package/client/dist/assets/html-OumBQJ-U.js +1 -0
- package/client/dist/assets/html.worker-CQP8QQsS.js +502 -0
- package/client/dist/assets/htmlMode-CStc3zXM.js +1 -0
- package/client/dist/assets/index-CimDRRi7.css +2 -0
- package/client/dist/assets/index-XGZaKl_u.js +142 -0
- package/client/dist/assets/ini-CB-6OVu3.js +1 -0
- package/client/dist/assets/integrations-C3p12Ms6.js +1 -0
- package/client/dist/assets/integrations-Cr6hH7XR.js +1 -0
- package/client/dist/assets/integrations-Cublz3m6.js +1 -0
- package/client/dist/assets/integrations-D28q1kF6.js +1 -0
- package/client/dist/assets/integrations-DRdbki5W.js +1 -0
- package/client/dist/assets/integrations-DaC4SzzL.js +1 -0
- package/client/dist/assets/integrations-DmQYCUvN.js +1 -0
- package/client/dist/assets/integrations-HIlUxXVs.js +1 -0
- package/client/dist/assets/java-d1CmfiHX.js +1 -0
- package/client/dist/assets/javascript-CMk--e7g.js +1 -0
- package/client/dist/assets/jobs-BE1siB0M.js +1 -0
- package/client/dist/assets/jobs-BHcQ_Faf.js +1 -0
- package/client/dist/assets/jobs-CFfc2dNX.js +1 -0
- package/client/dist/assets/jobs-CSi5n8X_.js +1 -0
- package/client/dist/assets/jobs-Dc3X86PY.js +1 -0
- package/client/dist/assets/jobs-De5tASex.js +1 -0
- package/client/dist/assets/jobs-DsoXEdo7.js +1 -0
- package/client/dist/assets/jobs-Wl-ApPMb.js +1 -0
- package/client/dist/assets/json.worker-DzV-CpCQ.js +58 -0
- package/client/dist/assets/jsonMode-C2h3ZcjZ.js +7 -0
- package/client/dist/assets/julia-Bgv08lKa.js +1 -0
- package/client/dist/assets/kotlin-u98kaVTf.js +1 -0
- package/client/dist/assets/less-CjYwpgg5.js +2 -0
- package/client/dist/assets/lexon-YTjaAFBB.js +1 -0
- package/client/dist/assets/lib-CPxTMOAq.js +7 -0
- package/client/dist/assets/liquid-mI3KJrBE.js +1 -0
- package/client/dist/assets/lspLanguageFeatures-DU09ggWi.js +4 -0
- package/client/dist/assets/lua-BzmkWv27.js +1 -0
- package/client/dist/assets/m3-CFwk9fw0.js +1 -0
- package/client/dist/assets/markdown-CR5iMpSZ.js +1 -0
- package/client/dist/assets/mdx-C41VDTR_.js +1 -0
- package/client/dist/assets/mips-CcEalc17.js +1 -0
- package/client/dist/assets/monaco.contribution-CPObAXMC.js +2 -0
- package/client/dist/assets/msdax-BQbkawnr.js +1 -0
- package/client/dist/assets/mysql-GTlaaW_P.js +1 -0
- package/client/dist/assets/nav-0fwkrgHt.js +1 -0
- package/client/dist/assets/nav-BEL3MTwK.js +1 -0
- package/client/dist/assets/nav-B_G-TJDW.js +1 -0
- package/client/dist/assets/nav-C2YXcbZS.js +1 -0
- package/client/dist/assets/nav-ClzOE4mA.js +1 -0
- package/client/dist/assets/nav-CtYwmMgu.js +1 -0
- package/client/dist/assets/nav-D2bOGSEg.js +1 -0
- package/client/dist/assets/nav-iH1V5j6o.js +1 -0
- package/client/dist/assets/objective-c-Byu1T5if.js +1 -0
- package/client/dist/assets/pascal-BrfzBfRm.js +1 -0
- package/client/dist/assets/pascaligo-BXXKFUeo.js +1 -0
- package/client/dist/assets/perl-B3OikKq-.js +1 -0
- package/client/dist/assets/pgsql-CTsa0Acc.js +1 -0
- package/client/dist/assets/php-DiQh3FUW.js +1 -0
- package/client/dist/assets/pla-92uH8Fzm.js +1 -0
- package/client/dist/assets/postiats-BbeWkKUr.js +1 -0
- package/client/dist/assets/powerquery-DgDMzpsm.js +1 -0
- package/client/dist/assets/powershell-BfdUUzaG.js +1 -0
- package/client/dist/assets/preload-helper-DSXbuxSR.js +1 -0
- package/client/dist/assets/protobuf-BojW2ftW.js +2 -0
- package/client/dist/assets/pug-BxqTg3IU.js +1 -0
- package/client/dist/assets/python-Y27rKQtk.js +1 -0
- package/client/dist/assets/qsharp-BX_A-MW9.js +1 -0
- package/client/dist/assets/r-D9BMnxvJ.js +1 -0
- package/client/dist/assets/razor-Cd5-q9Bp.js +1 -0
- package/client/dist/assets/redis-5cJqEQJJ.js +1 -0
- package/client/dist/assets/redshift-d8BBqiwb.js +1 -0
- package/client/dist/assets/restructuredtext-C8a6yIcZ.js +1 -0
- package/client/dist/assets/ruby-egeh-6KX.js +1 -0
- package/client/dist/assets/rust-a3r9IInB.js +1 -0
- package/client/dist/assets/sb-y8iRIDei.js +1 -0
- package/client/dist/assets/scala-BPDK2AmK.js +1 -0
- package/client/dist/assets/scheme-BIWUEoOs.js +1 -0
- package/client/dist/assets/scss-CA-PSzwg.js +3 -0
- package/client/dist/assets/settings-55oDcbSh.js +1 -0
- package/client/dist/assets/settings-Bd4Tq1RB.js +1 -0
- package/client/dist/assets/settings-CCSM-Fhn.js +1 -0
- package/client/dist/assets/settings-D3e_bDoW.js +1 -0
- package/client/dist/assets/settings-DKbTkbn7.js +1 -0
- package/client/dist/assets/settings-Dxpo6_w7.js +1 -0
- package/client/dist/assets/settings-bt84e3Aa.js +1 -0
- package/client/dist/assets/settings-nu68QukM.js +1 -0
- package/client/dist/assets/setup-BMqwfbW9.js +1 -0
- package/client/dist/assets/setup-Bb5LcG28.js +1 -0
- package/client/dist/assets/setup-BeEx2_da.js +1 -0
- package/client/dist/assets/setup-CCCrB53Q.js +1 -0
- package/client/dist/assets/setup-CJA0ATmd.js +1 -0
- package/client/dist/assets/setup-CeiDbZcb.js +1 -0
- package/client/dist/assets/setup-Cus7TApA.js +1 -0
- package/client/dist/assets/setup-D9qOs2Xo.js +1 -0
- package/client/dist/assets/shell--LiT1Bja.js +1 -0
- package/client/dist/assets/solidity-DdqZccZg.js +1 -0
- package/client/dist/assets/sophia-S6-YxNG_.js +1 -0
- package/client/dist/assets/sparql-BSf5kMp2.js +1 -0
- package/client/dist/assets/specs-BFfu3u-a.js +1 -0
- package/client/dist/assets/specs-B__C8-8a.js +1 -0
- package/client/dist/assets/specs-CZ1PsXsC.js +1 -0
- package/client/dist/assets/specs-D2FzlLn9.js +1 -0
- package/client/dist/assets/specs-DaUTrNF9.js +1 -0
- package/client/dist/assets/specs-Dyc5hYeE.js +1 -0
- package/client/dist/assets/specs-cKEh2LXt.js +1 -0
- package/client/dist/assets/specs-k0PyLDVt.js +1 -0
- package/client/dist/assets/sql-D7KgjR8G.js +1 -0
- package/client/dist/assets/st-BnoDa-Ml.js +1 -0
- package/client/dist/assets/swift-DEUHTkUX.js +1 -0
- package/client/dist/assets/systemverilog-Tqb_KPnW.js +1 -0
- package/client/dist/assets/tcl-BmBFS2qq.js +1 -0
- package/client/dist/assets/terminal-80yDMgMF.js +1 -0
- package/client/dist/assets/terminal-Bje4ziIa.js +1 -0
- package/client/dist/assets/terminal-C2WYcFHF.js +1 -0
- package/client/dist/assets/terminal-CSONJOex.js +1 -0
- package/client/dist/assets/terminal-DEqzGtcr.js +1 -0
- package/client/dist/assets/terminal-DeWzh6ys.js +1 -0
- package/client/dist/assets/terminal-YOlsJCQj.js +1 -0
- package/client/dist/assets/terminal-lkZYR4wJ.js +1 -0
- package/client/dist/assets/tickets-CB7N30gm.js +1 -0
- package/client/dist/assets/tickets-CF2PYelu.js +1 -0
- package/client/dist/assets/tickets-DNOANUXr.js +1 -0
- package/client/dist/assets/tickets-DU1aqsbr.js +1 -0
- package/client/dist/assets/tickets-DYvafSaY.js +1 -0
- package/client/dist/assets/tickets-DlpC_iTg.js +1 -0
- package/client/dist/assets/tickets-DucYgtdl.js +1 -0
- package/client/dist/assets/tickets-clefmXLv.js +1 -0
- package/client/dist/assets/ts.worker-METxwbDZ.js +67719 -0
- package/client/dist/assets/tsMode-B0y_xEci.js +11 -0
- package/client/dist/assets/twig-BQV8igWC.js +1 -0
- package/client/dist/assets/typescript-BzK0OgwW.js +1 -0
- package/client/dist/assets/typespec-DlFroUGY.js +1 -0
- package/client/dist/assets/useProjectCache-DSaiGFjV.js +1 -0
- package/client/dist/assets/vb-BlrJpIMX.js +1 -0
- package/client/dist/assets/wgsl-BWgIc6FZ.js +298 -0
- package/client/dist/assets/workers-rt--R2Qy.js +1 -0
- package/client/dist/assets/xml-eX9QXAmI.js +1 -0
- package/client/dist/assets/yaml-fcsNkpOt.js +1 -0
- package/client/dist/index.html +246 -0
- package/docs/README.md +54 -0
- package/docs/cli.md +198 -0
- package/docs/codex.md +210 -0
- package/docs/creating-specs.md +197 -0
- package/docs/customizing.md +197 -0
- package/docs/getting-started.md +140 -0
- package/docs/internals/README.md +25 -0
- package/docs/internals/adding-a-provider.md +238 -0
- package/docs/internals/api-reference.md +634 -0
- package/docs/internals/architecture.md +332 -0
- package/docs/internals/configuration.md +172 -0
- package/docs/internals/openspec-workflow.md +282 -0
- package/docs/internals/operations-runbook.md +198 -0
- package/docs/internals/profiles.md +152 -0
- package/docs/platforms/macos.md +130 -0
- package/docs/platforms/windows.md +81 -0
- package/docs/running-pipelines.md +240 -0
- package/docs/terminal.md +138 -0
- package/docs/tracking-cost.md +155 -0
- package/package.json +82 -0
- package/server/dist/agent-generator.js +232 -0
- package/server/dist/agent-refine-db.js +124 -0
- package/server/dist/agent-refine-manager.js +526 -0
- package/server/dist/ai-invocations.js +111 -0
- package/server/dist/attachment-manager.js +299 -0
- package/server/dist/auth.js +207 -0
- package/server/dist/binary-probe.js +35 -0
- package/server/dist/browser-capture-manager.js +576 -0
- package/server/dist/browser-capture-types.js +28 -0
- package/server/dist/browser-network.js +149 -0
- package/server/dist/browser-playwright.js +888 -0
- package/server/dist/build-dirs.js +44 -0
- package/server/dist/changes-reader.js +120 -0
- package/server/dist/chat-manager.js +1060 -0
- package/server/dist/chromium-resolver.js +311 -0
- package/server/dist/code-explorer-router.js +788 -0
- package/server/dist/codex-otel-bridge.js +235 -0
- package/server/dist/command-resolver.js +102 -0
- package/server/dist/config.js +306 -0
- package/server/dist/context-budget.js +113 -0
- package/server/dist/context-scope.js +279 -0
- package/server/dist/contract-refine-runner.js +521 -0
- package/server/dist/core-compat.js +207 -0
- package/server/dist/core-package.js +14 -0
- package/server/dist/db.js +1034 -0
- package/server/dist/desktop-analytics.js +156 -0
- package/server/dist/desktop-db.js +456 -0
- package/server/dist/desktop-router.js +735 -0
- package/server/dist/docs-router.js +207 -0
- package/server/dist/explore-contract-refine.js +421 -0
- package/server/dist/explore-cwd-manager.js +242 -0
- package/server/dist/explore-draft-title.js +47 -0
- package/server/dist/explore-smash.js +450 -0
- package/server/dist/feature-flags.js +17 -0
- package/server/dist/file-provenance.js +382 -0
- package/server/dist/file-summary-generator.js +221 -0
- package/server/dist/file-summary-manager.js +689 -0
- package/server/dist/hooks.js +102 -0
- package/server/dist/ids.js +7 -0
- package/server/dist/index.js +586 -0
- package/server/dist/metrics.js +136 -0
- package/server/dist/mobile/index.js +16 -0
- package/server/dist/mobile/mobile-admin-router.js +84 -0
- package/server/dist/mobile/mobile-auth.js +67 -0
- package/server/dist/mobile/mobile-devices.js +80 -0
- package/server/dist/mobile/mobile-event-bus.js +39 -0
- package/server/dist/mobile/mobile-gateway.js +285 -0
- package/server/dist/mobile/mobile-mdns.js +81 -0
- package/server/dist/mobile/mobile-pairing.js +179 -0
- package/server/dist/mobile/mobile-redact.js +53 -0
- package/server/dist/mobile/mobile-router.js +411 -0
- package/server/dist/mobile/mobile-tls.js +86 -0
- package/server/dist/mobile/mobile-types.js +9 -0
- package/server/dist/mobile/mobile-ws.js +275 -0
- package/server/dist/path-resolver.js +298 -0
- package/server/dist/plugin-manager.js +617 -0
- package/server/dist/plugins/claude-approval.js +179 -0
- package/server/dist/plugins/claude-md-mutation.js +146 -0
- package/server/dist/plugins/codex-mcp.js +108 -0
- package/server/dist/plugins/contributors.js +72 -0
- package/server/dist/plugins/drift.js +58 -0
- package/server/dist/plugins/index.js +14 -0
- package/server/dist/plugins/json-mutation.js +120 -0
- package/server/dist/plugins/manager.js +32 -0
- package/server/dist/plugins/ownership.js +86 -0
- package/server/dist/plugins/paths.js +37 -0
- package/server/dist/plugins/prereq-installer.js +104 -0
- package/server/dist/plugins/rail-integration.js +79 -0
- package/server/dist/plugins/serena/index.js +13 -0
- package/server/dist/plugins/serena/install.js +91 -0
- package/server/dist/plugins/serena/instructions-content.js +21 -0
- package/server/dist/plugins/serena/manifest.js +111 -0
- package/server/dist/plugins/serena/verify.js +78 -0
- package/server/dist/plugins-router.js +215 -0
- package/server/dist/pricing.js +89 -0
- package/server/dist/profile-manager.js +310 -0
- package/server/dist/profiles-router.js +759 -0
- package/server/dist/project-registry.js +443 -0
- package/server/dist/project-router.js +4016 -0
- package/server/dist/proposal-manager.js +291 -0
- package/server/dist/provider-selection.js +69 -0
- package/server/dist/providers/claude-adapter.js +281 -0
- package/server/dist/providers/codex-adapter.js +264 -0
- package/server/dist/providers/index.js +23 -0
- package/server/dist/providers/registry.js +37 -0
- package/server/dist/providers/types.js +22 -0
- package/server/dist/queue-manager.js +1511 -0
- package/server/dist/rails-router.js +362 -0
- package/server/dist/rails-store.js +116 -0
- package/server/dist/result-event.js +106 -0
- package/server/dist/schemas/profile.v1.json +151 -0
- package/server/dist/setup-manager.js +1165 -0
- package/server/dist/setup-prerequisites.js +372 -0
- package/server/dist/smash-runner.js +663 -0
- package/server/dist/spec-draft-parser.js +133 -0
- package/server/dist/spec-launcher-manager.js +174 -0
- package/server/dist/spec-models.js +32 -0
- package/server/dist/specrails-tech-client.js +82 -0
- package/server/dist/spending.js +448 -0
- package/server/dist/telemetry-compactor.js +180 -0
- package/server/dist/telemetry-export.js +317 -0
- package/server/dist/telemetry-receiver.js +224 -0
- package/server/dist/terminal-manager.js +633 -0
- package/server/dist/terminal-marks-store.js +117 -0
- package/server/dist/terminal-osc-parser.js +159 -0
- package/server/dist/terminal-settings.js +282 -0
- package/server/dist/terminal-shell-integration.js +196 -0
- package/server/dist/ticket-broadcast.js +47 -0
- package/server/dist/ticket-store.js +397 -0
- package/server/dist/ticket-watcher.js +117 -0
- package/server/dist/types.js +10 -0
- package/server/dist/user-mcp-config.js +117 -0
- package/server/dist/util/cli-prompt.js +181 -0
- package/server/dist/util/secure-fs.js +50 -0
- package/server/dist/util/win-spawn.js +43 -0
- package/server/dist/webhook-manager.js +89 -0
- package/server/dist/ws-routing.js +47 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Explore a spec idea and produce a structured proposal
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are a senior product engineer helping evaluate and structure a spec proposal for this codebase.
|
|
6
|
+
|
|
7
|
+
The user's raw idea is:
|
|
8
|
+
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Your Task
|
|
12
|
+
|
|
13
|
+
Before proposing anything, explore the codebase to understand:
|
|
14
|
+
1. What already exists that relates to this idea
|
|
15
|
+
2. What the current architecture looks like in the relevant area
|
|
16
|
+
3. What constraints or patterns you must respect
|
|
17
|
+
|
|
18
|
+
Use Read, Glob, and Grep to explore. Take at least 3 codebase reads before writing the proposal.
|
|
19
|
+
|
|
20
|
+
## Required Output
|
|
21
|
+
|
|
22
|
+
Output ONLY the following structured markdown. Do not add any preamble or explanation outside these sections.
|
|
23
|
+
|
|
24
|
+
## Spec Title
|
|
25
|
+
[A concise, action-oriented title, e.g., "Add Real-Time Cost Alerts"]
|
|
26
|
+
|
|
27
|
+
## Problem Statement
|
|
28
|
+
[2-3 sentences: what problem does this solve? Who experiences it? What is the current workaround?]
|
|
29
|
+
|
|
30
|
+
## Proposed Solution
|
|
31
|
+
[3-5 sentences: what exactly will be built? Be specific about the UI, API, and data changes.]
|
|
32
|
+
|
|
33
|
+
## Out of Scope
|
|
34
|
+
[Bullet list of things this proposal deliberately does NOT cover]
|
|
35
|
+
|
|
36
|
+
## Acceptance Criteria
|
|
37
|
+
[Numbered list of testable outcomes. Each criterion must be independently verifiable.]
|
|
38
|
+
|
|
39
|
+
## Technical Considerations
|
|
40
|
+
[Bullet list of implementation notes, constraints from the existing architecture, risks, and dependencies]
|
|
41
|
+
|
|
42
|
+
## Estimated Complexity
|
|
43
|
+
[One of: Low (< 1 day) / Medium (1-3 days) / High (3-7 days) / Very High (> 1 week)]
|
|
44
|
+
[One sentence justifying the estimate]
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Backlog Sync
|
|
49
|
+
|
|
50
|
+
After generating the proposal, read `.specrails/backlog-config.json` to determine `BACKLOG_PROVIDER` and `BACKLOG_WRITE`.
|
|
51
|
+
|
|
52
|
+
If `.specrails/backlog-config.json` does not exist, default to `provider=local` and `write_access=true`. Initialize `.specrails/local-tickets.json` if it does not exist (empty store with `schema_version: "1.0"`, `revision: 0`, `next_id: 1`, `tickets: {}`).
|
|
53
|
+
|
|
54
|
+
### If provider=local — Create Local Ticket
|
|
55
|
+
|
|
56
|
+
Create a local ticket from the proposal output:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Set the following fields:
|
|
63
|
+
- `title`: The Spec Title from the proposal
|
|
64
|
+
- `description`: The full structured proposal markdown (all sections from Problem Statement through Estimated Complexity)
|
|
65
|
+
- `status`: `"todo"`
|
|
66
|
+
- `priority`: Map Estimated Complexity — Low → `"low"`, Medium → `"medium"`, High/Very High → `"high"`
|
|
67
|
+
- `labels`: `["spec-proposal"]`
|
|
68
|
+
- `source`: `"propose-spec"`
|
|
69
|
+
- `created_by`: `"sr-product-engineer"`
|
|
70
|
+
|
|
71
|
+
Print: `Created local ticket #{id}: {title}`
|
|
72
|
+
|
|
73
|
+
### If provider=github and BACKLOG_WRITE=true — Create GitHub Issue
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Create a GitHub Issue with:
|
|
80
|
+
- Title: The Spec Title
|
|
81
|
+
- Body: Full structured proposal markdown
|
|
82
|
+
- Labels: `spec-proposal`
|
|
83
|
+
|
|
84
|
+
Print: `Created GitHub Issue #{number}: {title}`
|
|
85
|
+
|
|
86
|
+
### If provider=jira and BACKLOG_WRITE=true — Create JIRA Story
|
|
87
|
+
|
|
88
|
+
Create a JIRA Story using the same authentication and API pattern as `/specrails:auto-propose-backlog-specs`:
|
|
89
|
+
- Summary: The Spec Title
|
|
90
|
+
- Description: Full structured proposal in Atlassian Document Format
|
|
91
|
+
- Labels: `spec-proposal`
|
|
92
|
+
|
|
93
|
+
Print: `Created JIRA ticket {key}: {title}`
|
|
94
|
+
|
|
95
|
+
### If BACKLOG_WRITE=false or provider=none
|
|
96
|
+
|
|
97
|
+
Do NOT create any tickets. Print:
|
|
98
|
+
```
|
|
99
|
+
Spec proposal ready. Create a ticket manually if desired:
|
|
100
|
+
Title: {Spec Title}
|
|
101
|
+
Complexity: {Estimated Complexity}
|
|
102
|
+
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Reconfig: Apply Agent Config to Generated Files
|
|
2
|
+
|
|
3
|
+
Reads `.specrails/agents.yaml` and updates the `model:` frontmatter field in all generated `.claude/agents/sr-*.md` files to match. No full re-setup needed — only model frontmatter is changed.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Step 1: Locate generated agents directory
|
|
8
|
+
|
|
9
|
+
Determine `$SPECRAILS_DIR`:
|
|
10
|
+
|
|
11
|
+
1. If `.codex/agents/` exists, set `cli_provider = "codex"` and `specrails_dir = ".codex"`.
|
|
12
|
+
2. Otherwise set `cli_provider = "claude"` and `specrails_dir = ".claude"`.
|
|
13
|
+
3. Set `$AGENTS_DIR = $SPECRAILS_DIR/agents`
|
|
14
|
+
|
|
15
|
+
## Step 2: Read agent config
|
|
16
|
+
|
|
17
|
+
Read `.specrails/agents.yaml`.
|
|
18
|
+
|
|
19
|
+
If the file does not exist, stop and display:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
No .specrails/agents.yaml found.
|
|
23
|
+
|
|
24
|
+
Run /specrails:enrich to generate the config file, then edit it before running /specrails:reconfig.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If the file exists, parse it. Validate all `model:` values — only `opus`, `sonnet`, and `haiku` are accepted. If an invalid value is found, display a warning and skip that agent:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Warning: unknown model "gpt-4" for sr-developer — skipping (valid values: opus, sonnet, haiku)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Step 3: Resolve model for each agent
|
|
34
|
+
|
|
35
|
+
For each agent file found in `$AGENTS_DIR/sr-*.md`:
|
|
36
|
+
|
|
37
|
+
1. Extract the agent name from the filename (e.g., `sr-developer.md` → `sr-developer`)
|
|
38
|
+
2. Resolve the target model:
|
|
39
|
+
- Check `agents.<agent-name>.model` in config (per-agent override)
|
|
40
|
+
- If not present, check `defaults.model` in config (global default)
|
|
41
|
+
- If neither is present, skip this agent
|
|
42
|
+
3. Read the current `model:` value from the file's YAML frontmatter
|
|
43
|
+
4. If the current model matches the target model, mark as **unchanged**
|
|
44
|
+
5. If they differ, record the change: `sr-<name>: <current> → <target>`
|
|
45
|
+
|
|
46
|
+
## Step 4: Apply changes
|
|
47
|
+
|
|
48
|
+
For each agent with a recorded change:
|
|
49
|
+
|
|
50
|
+
1. Read the file
|
|
51
|
+
2. Replace the `model:` line in the YAML frontmatter with the resolved value
|
|
52
|
+
3. Write the file back
|
|
53
|
+
|
|
54
|
+
The `model:` line is always in the frontmatter block (between the first `---` and second `---`). Replace only that specific line — do not modify any other content.
|
|
55
|
+
|
|
56
|
+
**Codex format:** If `cli_provider == "codex"`, apply the same logic to `.codex/agents/sr-*.toml` files. Replace the `model = "..."` line with the mapped Codex model:
|
|
57
|
+
- `sonnet` → `codex-mini-latest`
|
|
58
|
+
- `opus` → `o3`
|
|
59
|
+
- `haiku` → `codex-mini-latest`
|
|
60
|
+
|
|
61
|
+
## Step 5: Report results
|
|
62
|
+
|
|
63
|
+
Display a summary of what changed:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
## Reconfig complete
|
|
67
|
+
|
|
68
|
+
Updated 2 agent(s):
|
|
69
|
+
sr-developer: sonnet → opus
|
|
70
|
+
sr-product-analyst: haiku → sonnet
|
|
71
|
+
|
|
72
|
+
Unchanged (3):
|
|
73
|
+
sr-architect, sr-reviewer, sr-product-manager
|
|
74
|
+
|
|
75
|
+
Skipped (1):
|
|
76
|
+
sr-custom-agent (not in config)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If nothing changed:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
All agents already match .specrails/agents.yaml — nothing to update.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If all agents were skipped due to validation errors, display:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
No agents updated. Fix the validation errors in .specrails/agents.yaml and retry.
|
|
89
|
+
```
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Refactor Recommender"
|
|
3
|
+
description: "Scan the codebase for refactoring opportunities ranked by impact/effort ratio and VPC persona value. Analyzes code for duplicates, long functions, large files, dead code, outdated patterns, and complex logic. Optionally creates GitHub Issues for tracking."
|
|
4
|
+
category: Workflow
|
|
5
|
+
tags: [workflow, refactoring, code-quality, tech-debt, vpc]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Scan the codebase for refactoring opportunities, score each by impact/effort ratio and VPC persona value, and optionally create GitHub Issues for the top findings in .
|
|
9
|
+
|
|
10
|
+
**Input:** `$ARGUMENTS` — optional: comma-separated paths to scope the analysis. Flags: `--dry-run` (print findings without creating issues).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Phase 0: Pre-flight
|
|
15
|
+
|
|
16
|
+
Check whether the GitHub CLI is available:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Set `GH_AVAILABLE=true` if the command succeeds, `GH_AVAILABLE=false` otherwise. Do not stop — analysis proceeds regardless. Parse `--dry-run` from `$ARGUMENTS` and set `DRY_RUN=true` if present.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 1: Scope
|
|
27
|
+
|
|
28
|
+
Parse paths from `$ARGUMENTS` after stripping any flags. If no paths are provided, scan the entire repository.
|
|
29
|
+
|
|
30
|
+
Always exclude the following from all analysis:
|
|
31
|
+
|
|
32
|
+
- `node_modules/`
|
|
33
|
+
- `.git/`
|
|
34
|
+
- `.claude/`
|
|
35
|
+
- `vendor/`
|
|
36
|
+
- `dist/`
|
|
37
|
+
- `build/`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Phase 1.5: VPC Context
|
|
42
|
+
|
|
43
|
+
Check whether persona files exist at `.claude/agents/personas/`. This path is present in any repo that has run `/specrails:enrich`.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ls .claude/agents/personas/ 2>/dev/null
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If the directory exists and contains persona files, set `VPC_AVAILABLE=true`. Otherwise set `VPC_AVAILABLE=false` and skip all VPC steps (they are optional enrichment, not blockers).
|
|
50
|
+
|
|
51
|
+
When `VPC_AVAILABLE=true`, read each persona file and extract a compact VPC summary. For each persona record:
|
|
52
|
+
|
|
53
|
+
- **name** — persona display name (e.g. "Alex — The Lead Dev")
|
|
54
|
+
- **top_jobs** — up to 3 functional jobs relevant to code quality and maintainability
|
|
55
|
+
- **critical_pains** — up to 3 pains marked Critical or High related to code reliability, complexity, or developer experience
|
|
56
|
+
- **high_gains** — up to 3 gains marked High related to code clarity, speed, or confidence
|
|
57
|
+
|
|
58
|
+
Store these as an in-memory `VPC_PROFILES` list. You will use it in Phase 3 to score persona fit.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 2: Analysis
|
|
63
|
+
|
|
64
|
+
Analyze the scoped files across six categories. For each finding record:
|
|
65
|
+
|
|
66
|
+
- **file** — relative path
|
|
67
|
+
- **line_range** — start and end line numbers
|
|
68
|
+
- **current_snippet** — the problematic code as-is
|
|
69
|
+
- **proposed_snippet** — concrete refactored version
|
|
70
|
+
- **rationale** — one sentence explaining the improvement
|
|
71
|
+
|
|
72
|
+
### Duplicate Code
|
|
73
|
+
|
|
74
|
+
Find code blocks larger than 10 lines that are substantially similar across two or more files. Consolidation into a shared function or module is the expected refactoring.
|
|
75
|
+
|
|
76
|
+
### Long Functions
|
|
77
|
+
|
|
78
|
+
Find functions or methods exceeding 50 lines. Extraction into smaller, single-purpose functions is the expected refactoring.
|
|
79
|
+
|
|
80
|
+
### Large Files
|
|
81
|
+
|
|
82
|
+
Find files exceeding 300 lines. Splitting into cohesive modules is the expected refactoring.
|
|
83
|
+
|
|
84
|
+
### Dead Code
|
|
85
|
+
|
|
86
|
+
Find unused exports, unreferenced functions, and commented-out blocks that have not been active for the lifetime of the file. Deletion or archival is the expected refactoring.
|
|
87
|
+
|
|
88
|
+
### Outdated Patterns
|
|
89
|
+
|
|
90
|
+
Find deprecated APIs and old language syntax: `var` instead of `let`/`const`, callbacks instead of `async`/`await`, legacy framework APIs with documented replacements, etc. Modernisation to current idioms is the expected refactoring.
|
|
91
|
+
|
|
92
|
+
### Complex Logic
|
|
93
|
+
|
|
94
|
+
Find deeply nested conditionals (more than 3 levels) and functions with high cyclomatic complexity. Extraction, early-return guards, or strategy patterns are the expected refactoring.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Phase 3: Score and Rank
|
|
99
|
+
|
|
100
|
+
Score every finding on three dimensions (1–5 each):
|
|
101
|
+
|
|
102
|
+
- **Impact** — how much the refactoring improves code quality, readability, or maintainability
|
|
103
|
+
- **Effort** — how hard the refactoring is to implement (1 = trivial, 5 = major)
|
|
104
|
+
- **VPC Value** — how directly this refactoring addresses persona jobs, pains, or gains (1 = no relevance, 5 = resolves a critical persona pain or delivers a high-value gain). Set to 3 when `VPC_AVAILABLE=false`.
|
|
105
|
+
|
|
106
|
+
**Scoring VPC Value** (only when `VPC_AVAILABLE=true`):
|
|
107
|
+
|
|
108
|
+
For each finding, reason over `VPC_PROFILES`:
|
|
109
|
+
|
|
110
|
+
- Does fixing this reduce a **Critical/High pain** for any persona? (e.g. complex logic → harder to trust AI output → Alex's "agents go off the rails" pain) → score 4–5
|
|
111
|
+
- Does fixing this deliver a **High gain** for any persona? (e.g. extracting a function → cleaner API surface → easier onboarding → Sara's gain) → score 3–4
|
|
112
|
+
- Is there indirect persona value? (e.g. dead code removal → smaller codebase → easier contributor review → Kai) → score 2–3
|
|
113
|
+
- No clear persona relevance → score 1–2
|
|
114
|
+
|
|
115
|
+
Assign one `vpc_value` integer per finding, and note the **primary persona** and **rationale** (one sentence).
|
|
116
|
+
|
|
117
|
+
**Composite score**: `impact * 2 + (6 - effort) + vpc_value`. Higher is better.
|
|
118
|
+
|
|
119
|
+
Sort all findings by composite score descending. If the same code block was flagged by multiple categories, keep only the highest-scored entry and discard the duplicates.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Phase 4: Create GitHub Issues
|
|
124
|
+
|
|
125
|
+
Skip this phase if `GH_AVAILABLE=false` or `DRY_RUN=true`.
|
|
126
|
+
|
|
127
|
+
First ensure the tracking labels exist:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
gh label create "refactor-opportunity" --color "B60205" --force
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Fetch existing open issues that already carry the label to avoid duplicates:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
gh issue list --label "refactor-opportunity" --state open --limit 100 --json number,title
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For each of the **top 5** findings (by composite score) that does not already have a matching open issue, create a GitHub Issue with the following body:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
## Refactoring Opportunity: {description}
|
|
143
|
+
|
|
144
|
+
**Category**: {category}
|
|
145
|
+
**File**: {file}:{line_range}
|
|
146
|
+
**Impact**: {impact}/5 | **Effort**: {effort}/5 | **Score**: {composite}
|
|
147
|
+
{vpc_line}
|
|
148
|
+
|
|
149
|
+
### Current Code
|
|
150
|
+
```{lang}
|
|
151
|
+
{current_snippet}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Proposed Refactoring
|
|
155
|
+
```{lang}
|
|
156
|
+
{proposed_snippet}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Rationale
|
|
160
|
+
{rationale}
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
_Generated by `/specrails:refactor-recommender` in specrails-desktop_
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Where `{vpc_line}` is included only when `VPC_AVAILABLE=true`:
|
|
167
|
+
`**VPC Value**: {vpc_value}/5 — {vpc_persona}: {vpc_rationale}`
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Phase 5: Output Summary
|
|
172
|
+
|
|
173
|
+
Print the following report:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
## Refactoring Opportunities — specrails-desktop
|
|
177
|
+
|
|
178
|
+
{N} opportunities found | Sorted by composite score
|
|
179
|
+
{vpc_header}
|
|
180
|
+
|
|
181
|
+
| # | Category | File | Impact | Effort | VPC | Score | Description |
|
|
182
|
+
|---|----------|------|--------|--------|-----|-------|-------------|
|
|
183
|
+
| 1 | {category} | {file}:{line_range} | {impact}/5 | {effort}/5 | {vpc_value}/5 | {composite} | {description} |
|
|
184
|
+
...
|
|
185
|
+
|
|
186
|
+
### Top 3 Detailed Recommendations
|
|
187
|
+
|
|
188
|
+
#### 1. {description}
|
|
189
|
+
**File**: {file}:{line_range}
|
|
190
|
+
**Category**: {category} | **Score**: {composite}
|
|
191
|
+
{vpc_detail}
|
|
192
|
+
|
|
193
|
+
**Current:**
|
|
194
|
+
```{lang}
|
|
195
|
+
{current_snippet}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Proposed:**
|
|
199
|
+
```{lang}
|
|
200
|
+
{proposed_snippet}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Rationale:** {rationale}
|
|
204
|
+
|
|
205
|
+
(repeat for #2 and #3)
|
|
206
|
+
|
|
207
|
+
Issues created: {N} (or "dry-run: no issues created")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Where:
|
|
211
|
+
- `{vpc_header}` is `VPC personas loaded: {persona names}` when `VPC_AVAILABLE=true`, or `VPC personas: not found (run /specrails:enrich to enable)` otherwise.
|
|
212
|
+
- `{vpc_detail}` is `**VPC Value**: {vpc_value}/5 — {vpc_persona}: {vpc_rationale}` when `VPC_AVAILABLE=true`, omitted otherwise.
|