prjct-cli 3.96.0 → 3.98.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/CHANGELOG.md +10 -0
- package/bin/prjct.cjs +14 -0
- package/dist/bin/core-chunks/agent-3N2MSSGT.mjs +31 -0
- package/dist/bin/core-chunks/agent-codenames-7N4DU62I.mjs +7 -0
- package/dist/bin/core-chunks/agent-identity-4KFRR5OU.mjs +7 -0
- package/dist/bin/core-chunks/agent-runtime-registry-3RMVBEV2.mjs +7 -0
- package/dist/bin/core-chunks/agent-switch-4SE6GF7R.mjs +7 -0
- package/dist/bin/core-chunks/agents-ZPNNCOH7.mjs +10 -0
- package/dist/bin/core-chunks/ai-provider-RVXK7D7R.mjs +7 -0
- package/dist/bin/core-chunks/analysis-OARMM4AH.mjs +41 -0
- package/dist/bin/core-chunks/auth-config-KWLVKHCY.mjs +7 -0
- package/dist/bin/core-chunks/auto-flush-XA3V7BJ6.mjs +7 -0
- package/dist/bin/core-chunks/auto-updater-PKYQRBGQ.mjs +8 -0
- package/dist/bin/core-chunks/bin-commands-FYID6EYI.mjs +21 -0
- package/dist/bin/core-chunks/capture-3JJPWIF3.mjs +7 -0
- package/dist/bin/core-chunks/capture-gate-G5LGVDME.mjs +7 -0
- package/dist/bin/core-chunks/ceremonies-B565WDCA.mjs +19 -0
- package/dist/bin/core-chunks/changelog-LPJ4GKB6.mjs +10 -0
- package/dist/bin/core-chunks/chunk-225DWS4D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-24EN5Y62.mjs +48 -0
- package/dist/bin/core-chunks/chunk-2EEMQV7N.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2FRLIQKX.mjs +10 -0
- package/dist/bin/core-chunks/chunk-2I5PUQWY.mjs +7 -0
- package/dist/bin/core-chunks/chunk-2JJM3YMW.mjs +44 -0
- package/dist/bin/core-chunks/chunk-2NI4EEK2.mjs +8 -0
- package/dist/bin/core-chunks/chunk-2TJRTFIS.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2VRS5CUH.mjs +9 -0
- package/dist/bin/core-chunks/chunk-2VXPFULA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-3OWKIRK6.mjs +7 -0
- package/dist/bin/core-chunks/chunk-3TRXQAU4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-45LKWJ5D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4IE7LRH3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4MR5XSLO.mjs +8 -0
- package/dist/bin/core-chunks/chunk-4PPIE6GA.mjs +102 -0
- package/dist/bin/core-chunks/chunk-4PRD4EU2.mjs +7 -0
- package/dist/bin/core-chunks/chunk-4T7NGLNQ.mjs +16 -0
- package/dist/bin/core-chunks/chunk-5DZ2LTII.mjs +52 -0
- package/dist/bin/core-chunks/chunk-5EF5EOCL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-5OWPZWEU.mjs +13 -0
- package/dist/bin/core-chunks/chunk-5TGZSK4C.mjs +10 -0
- package/dist/bin/core-chunks/chunk-5YLI5V3Q.mjs +8 -0
- package/dist/bin/core-chunks/chunk-5ZBACKED.mjs +14 -0
- package/dist/bin/core-chunks/chunk-623SNKDH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6FUCOGOW.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6KNMT46X.mjs +18 -0
- package/dist/bin/core-chunks/chunk-6OYLZ4NM.mjs +10 -0
- package/dist/bin/core-chunks/chunk-6POAOY5C.mjs +19 -0
- package/dist/bin/core-chunks/chunk-6RT2P22O.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6U3CYLY5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-6U3MV7KZ.mjs +15 -0
- package/dist/bin/core-chunks/chunk-6XTLPAPZ.mjs +15 -0
- package/dist/bin/core-chunks/chunk-76YMLNLF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-7BU6SJBC.mjs +17 -0
- package/dist/bin/core-chunks/chunk-7QTE6X4J.mjs +7 -0
- package/dist/bin/core-chunks/chunk-7ZHWJSW5.mjs +8 -0
- package/dist/bin/core-chunks/chunk-ACIOJQSI.mjs +14 -0
- package/dist/bin/core-chunks/chunk-AJXELVNH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ALTQ3KL4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ANBDOI53.mjs +8 -0
- package/dist/bin/core-chunks/chunk-ANVCA6LF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-AS3LWTQ4.mjs +16 -0
- package/dist/bin/core-chunks/chunk-B2HY22OD.mjs +50 -0
- package/dist/bin/core-chunks/chunk-B7AQHL7B.mjs +7 -0
- package/dist/bin/core-chunks/chunk-BSR3XUBD.mjs +24 -0
- package/dist/bin/core-chunks/chunk-BTSHD3XJ.mjs +9 -0
- package/dist/bin/core-chunks/chunk-BUD3R6LF.mjs +9 -0
- package/dist/bin/core-chunks/chunk-C35JQUWD.mjs +8 -0
- package/dist/bin/core-chunks/chunk-C7YBUD4K.mjs +10 -0
- package/dist/bin/core-chunks/chunk-CA2VFWFP.mjs +21 -0
- package/dist/bin/core-chunks/chunk-CB3CNJTL.mjs +10 -0
- package/dist/bin/core-chunks/chunk-CFD6CW7T.mjs +46 -0
- package/dist/bin/core-chunks/chunk-CKYBGRCF.mjs +8 -0
- package/dist/bin/core-chunks/chunk-CUIB6CTG.mjs +20 -0
- package/dist/bin/core-chunks/chunk-CVKMV22J.mjs +17 -0
- package/dist/bin/core-chunks/chunk-CWLGRKA7.mjs +6 -0
- package/dist/bin/core-chunks/chunk-CXKDKMYE.mjs +9 -0
- package/dist/bin/core-chunks/chunk-CXNVDJNN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-D62TAZG6.mjs +9 -0
- package/dist/bin/core-chunks/chunk-DEYAQEF5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DIEPWXJJ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DMO3ZFUG.mjs +1259 -0
- package/dist/bin/core-chunks/chunk-DOJPSIMG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DTMZBK4E.mjs +7 -0
- package/dist/bin/core-chunks/chunk-DW4QMD6J.mjs +10 -0
- package/dist/bin/core-chunks/chunk-DZDEBDAB.mjs +10 -0
- package/dist/bin/core-chunks/chunk-DZVOFEM5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-E5QQDYBR.mjs +7 -0
- package/dist/bin/core-chunks/chunk-E73HSXCX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-EFSPBB4S.mjs +8 -0
- package/dist/bin/core-chunks/chunk-EHVU2SMR.mjs +34 -0
- package/dist/bin/core-chunks/chunk-ESB4ALH2.mjs +7 -0
- package/dist/bin/core-chunks/chunk-EZRNQXCC.mjs +7 -0
- package/dist/bin/core-chunks/chunk-F2FKQUYE.mjs +19 -0
- package/dist/bin/core-chunks/chunk-F7OOBAJO.mjs +30 -0
- package/dist/bin/core-chunks/chunk-FATYLG3L.mjs +14 -0
- package/dist/bin/core-chunks/chunk-FOUBHU4X.mjs +7 -0
- package/dist/bin/core-chunks/chunk-FOWTB762.mjs +7 -0
- package/dist/bin/core-chunks/chunk-GGGDYL4P.mjs +7 -0
- package/dist/bin/core-chunks/chunk-GHSRH4GL.mjs +8 -0
- package/dist/bin/core-chunks/chunk-GSNQKBHZ.mjs +11 -0
- package/dist/bin/core-chunks/chunk-GTG67Z45.mjs +11 -0
- package/dist/bin/core-chunks/chunk-H2KNJUPN.mjs +23 -0
- package/dist/bin/core-chunks/chunk-HA7Y76GF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HCPQZRR3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HPCSSJXH.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HU5ERAAV.mjs +8 -0
- package/dist/bin/core-chunks/chunk-HVXWQ2XZ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-HYIT7MF5.mjs +8 -0
- package/dist/bin/core-chunks/chunk-HYMJVHAX.mjs +13 -0
- package/dist/bin/core-chunks/chunk-ID2C2S33.mjs +18 -0
- package/dist/bin/core-chunks/chunk-ID5KE74L.mjs +7 -0
- package/dist/bin/core-chunks/chunk-IJNKHQIS.mjs +10 -0
- package/dist/bin/core-chunks/chunk-INJ5WT2D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-IOFCSTGM.mjs +7 -0
- package/dist/bin/core-chunks/chunk-J6Y7IVFQ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JCWA7NLM.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JGGQSMZC.mjs +8 -0
- package/dist/bin/core-chunks/chunk-JPMUJY42.mjs +7 -0
- package/dist/bin/core-chunks/chunk-JT4RNQ67.mjs +15 -0
- package/dist/bin/core-chunks/chunk-KI4OY3UQ.mjs +18 -0
- package/dist/bin/core-chunks/chunk-KPR5TWSN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-KUQLXY2P.mjs +11 -0
- package/dist/bin/core-chunks/chunk-L3DJN3XD.mjs +12 -0
- package/dist/bin/core-chunks/chunk-L4TUXFCL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-L5LFLI4R.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LFOQ7FCR.mjs +10 -0
- package/dist/bin/core-chunks/chunk-LGX2GM45.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LTKUTRRL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-LZILSE5H.mjs +8 -0
- package/dist/bin/core-chunks/chunk-MCY7OXED.mjs +10 -0
- package/dist/bin/core-chunks/chunk-MG3YN3AI.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MPU3VM6Z.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MR5XXHRK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-MXJF3FA7.mjs +7 -0
- package/dist/bin/core-chunks/chunk-MXJKULJY.mjs +9 -0
- package/dist/bin/core-chunks/chunk-NINFE7GS.mjs +9 -0
- package/dist/bin/core-chunks/chunk-NNILF7R3.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NNOX3UU4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NOHSLOLL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-NXUIMC22.mjs +13 -0
- package/dist/bin/core-chunks/chunk-NZKUCQZK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-O5N6XYPU.mjs +8 -0
- package/dist/bin/core-chunks/chunk-O5VCBMEK.mjs +25 -0
- package/dist/bin/core-chunks/chunk-OE27RFLJ.mjs +8 -0
- package/dist/bin/core-chunks/chunk-OGM34Z6W.mjs +8 -0
- package/dist/bin/core-chunks/chunk-OIE3AKKO.mjs +7 -0
- package/dist/bin/core-chunks/chunk-OXKGN3HG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-P2KU4FFA.mjs +11 -0
- package/dist/bin/core-chunks/chunk-PIA26GWG.mjs +7 -0
- package/dist/bin/core-chunks/chunk-PPSVWUXC.mjs +15 -0
- package/dist/bin/core-chunks/chunk-PQTR6XVW.mjs +7 -0
- package/dist/bin/core-chunks/chunk-PWL3KS7Y.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q3LUL6LL.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q6C27OL7.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Q7GJIU6D.mjs +8 -0
- package/dist/bin/core-chunks/chunk-QAIEAOJF.mjs +7 -0
- package/dist/bin/core-chunks/chunk-QWRPJARA.mjs +14 -0
- package/dist/bin/core-chunks/chunk-QZ7T2EYR.mjs +25 -0
- package/dist/bin/core-chunks/chunk-RACISWUV.mjs +10 -0
- package/dist/bin/core-chunks/chunk-RCIWCKL7.mjs +9 -0
- package/dist/bin/core-chunks/chunk-ROOCBUKH.mjs +8 -0
- package/dist/bin/core-chunks/chunk-RP7F67ZT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-RXZJB43D.mjs +7 -0
- package/dist/bin/core-chunks/chunk-S6FBPXQL.mjs +9 -0
- package/dist/bin/core-chunks/chunk-SLYLGDX7.mjs +8 -0
- package/dist/bin/core-chunks/chunk-SO3ZPNWT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-SRJEX6XF.mjs +12 -0
- package/dist/bin/core-chunks/chunk-SROBBOJB.mjs +11 -0
- package/dist/bin/core-chunks/chunk-STFUT7R7.mjs +28 -0
- package/dist/bin/core-chunks/chunk-SUXIKMTS.mjs +30 -0
- package/dist/bin/core-chunks/chunk-TDTPDVUM.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TIBYHZFA.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TILUQF6L.mjs +8 -0
- package/dist/bin/core-chunks/chunk-TOORPP6K.mjs +7 -0
- package/dist/bin/core-chunks/chunk-U24YKPYX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-U55OPVYR.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UAYTDSYG.mjs +64 -0
- package/dist/bin/core-chunks/chunk-UHXV7MDW.mjs +12 -0
- package/dist/bin/core-chunks/chunk-UNIBFM6J.mjs +13 -0
- package/dist/bin/core-chunks/chunk-UNNY2IWZ.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UX2ORID4.mjs +9 -0
- package/dist/bin/core-chunks/chunk-UYMZ3NAF.mjs +8 -0
- package/dist/bin/core-chunks/chunk-V6L5PLD7.mjs +18 -0
- package/dist/bin/core-chunks/chunk-V7R3L54M.mjs +7 -0
- package/dist/bin/core-chunks/chunk-V7VA4EQX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-VCSESVZ4.mjs +9 -0
- package/dist/bin/core-chunks/chunk-VCYVYFWE.mjs +9 -0
- package/dist/bin/core-chunks/chunk-VJCTTFKP.mjs +8 -0
- package/dist/bin/core-chunks/chunk-VRFYDYQY.mjs +7 -0
- package/dist/bin/core-chunks/chunk-VWFVSNQT.mjs +7 -0
- package/dist/bin/core-chunks/chunk-W23JLJJZ.mjs +109 -0
- package/dist/bin/core-chunks/chunk-WCTVZQBG.mjs +8 -0
- package/dist/bin/core-chunks/chunk-WTDUJB4I.mjs +8 -0
- package/dist/bin/core-chunks/chunk-WZ6W5ZQ5.mjs +7 -0
- package/dist/bin/core-chunks/chunk-X433BB6F.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XBR63NJA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XC6YAP36.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XJTEPHLC.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XLAGA5B7.mjs +10 -0
- package/dist/bin/core-chunks/chunk-XLFEWZRA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XSZOHNL4.mjs +7 -0
- package/dist/bin/core-chunks/chunk-XWLTEAGN.mjs +7 -0
- package/dist/bin/core-chunks/chunk-Y7XOKG4O.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YEALP3WX.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YJOC2JJK.mjs +12 -0
- package/dist/bin/core-chunks/chunk-YLYAYRSJ.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YOGI4WE6.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YOWW4LHK.mjs +8 -0
- package/dist/bin/core-chunks/chunk-YPLFWN62.mjs +7 -0
- package/dist/bin/core-chunks/chunk-YQ6HM3YO.mjs +10 -0
- package/dist/bin/core-chunks/chunk-YZEO5DZA.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZAUJWUUN.mjs +20 -0
- package/dist/bin/core-chunks/chunk-ZBBNCCGV.mjs +12 -0
- package/dist/bin/core-chunks/chunk-ZQ2XH76U.mjs +12 -0
- package/dist/bin/core-chunks/chunk-ZSANMA7K.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZXTJLMVZ.mjs +7 -0
- package/dist/bin/core-chunks/chunk-ZZR3LXCK.mjs +9 -0
- package/dist/bin/core-chunks/cleanup-installs-LD43GI4K.mjs +7 -0
- package/dist/bin/core-chunks/client-D43KKUYH.mjs +8 -0
- package/dist/bin/core-chunks/closest-command-YYNABM7V.mjs +7 -0
- package/dist/bin/core-chunks/cloud-RXHFZ7MX.mjs +14 -0
- package/dist/bin/core-chunks/code-IYK65A62.mjs +12 -0
- package/dist/bin/core-chunks/code-graph-cloud-G3WQBICY.mjs +7 -0
- package/dist/bin/core-chunks/codex-hooks-N5UHKK5B.mjs +7 -0
- package/dist/bin/core-chunks/codex-mcp-G7WNAT6T.mjs +7 -0
- package/dist/bin/core-chunks/codex-skill-IZNP76BJ.mjs +7 -0
- package/dist/bin/core-chunks/command-installer-4ENM4GZR.mjs +7 -0
- package/dist/bin/core-chunks/config-UVF7YOR6.mjs +8 -0
- package/dist/bin/core-chunks/config-manager-QY73WM5U.mjs +7 -0
- package/dist/bin/core-chunks/content-bound-stamp-2PJNI4JC.mjs +7 -0
- package/dist/bin/core-chunks/context-4GB6ICXK.mjs +38 -0
- package/dist/bin/core-chunks/context-MPHOQPXF.mjs +10 -0
- package/dist/bin/core-chunks/context-checkpoint-NBI5HKPV.mjs +27 -0
- package/dist/bin/core-chunks/context-pressure-5URQVNBC.mjs +7 -0
- package/dist/bin/core-chunks/context-tiers-NOKJ75QP.mjs +7 -0
- package/dist/bin/core-chunks/context7-service-2MYRUNKY.mjs +7 -0
- package/dist/bin/core-chunks/core-WMEHDCOK.mjs +70 -0
- package/dist/bin/core-chunks/crew-EYVSIX4L.mjs +24 -0
- package/dist/bin/core-chunks/cursor-hooks-DGDJVAI6.mjs +7 -0
- package/dist/bin/core-chunks/custom-workflow-storage-EBEIG54R.mjs +7 -0
- package/dist/bin/core-chunks/cwd-changed-EUJZOBIC.mjs +7 -0
- package/dist/bin/core-chunks/cycle-budget-card-H37XRAIX.mjs +7 -0
- package/dist/bin/core-chunks/daemon-QARP3RVX.mjs +13 -0
- package/dist/bin/core-chunks/database-UU2ZXSD4.mjs +7 -0
- package/dist/bin/core-chunks/delivery-geometry-GSJ6LXUC.mjs +7 -0
- package/dist/bin/core-chunks/detect-changes-2YIEX7AY.mjs +7 -0
- package/dist/bin/core-chunks/detection-KKDZYWVD.mjs +7 -0
- package/dist/bin/core-chunks/developer-evolution-AVAXGDKQ.mjs +11 -0
- package/dist/bin/core-chunks/developer-profile-2VSFJGCU.mjs +7 -0
- package/dist/bin/core-chunks/discuss-lock-CWXKBBYJ.mjs +7 -0
- package/dist/bin/core-chunks/distill-ZF7WHGCZ.mjs +7 -0
- package/dist/bin/core-chunks/doctor-heal-XFSVPSEY.mjs +7 -0
- package/dist/bin/core-chunks/doctor-service-6ZJBWIXR.mjs +8 -0
- package/dist/bin/core-chunks/drift-refresh-XPJAO2B3.mjs +7 -0
- package/dist/bin/core-chunks/dynasty-outcomes-KDWIEA4Y.mjs +11 -0
- package/dist/bin/core-chunks/editors-config-ELAQA6RV.mjs +7 -0
- package/dist/bin/core-chunks/embeddings-354ZYFKX.mjs +7 -0
- package/dist/bin/core-chunks/enriched-recall-MKBOXB7M.mjs +7 -0
- package/dist/bin/core-chunks/eval-O4YD6YOV.mjs +76 -0
- package/dist/bin/core-chunks/exec-34V6SJYO.mjs +7 -0
- package/dist/bin/core-chunks/file-helper-LLQKU6YF.mjs +7 -0
- package/dist/bin/core-chunks/format-SYVL4CV5.mjs +7 -0
- package/dist/bin/core-chunks/gemini-settings-RGD7JLSP.mjs +7 -0
- package/dist/bin/core-chunks/git-context-ZSWE3KWM.mjs +8 -0
- package/dist/bin/core-chunks/git-helpers-UC53D4FT.mjs +7 -0
- package/dist/bin/core-chunks/grok-mcp-IE2RRRRW.mjs +7 -0
- package/dist/bin/core-chunks/grok-plugin-SSANHBS7.mjs +7 -0
- package/dist/bin/core-chunks/grok-skill-7ZP7R7KO.mjs +7 -0
- package/dist/bin/core-chunks/guard-RT7U3LJX.mjs +13 -0
- package/dist/bin/core-chunks/guards-AXH6V2IJ.mjs +7 -0
- package/dist/bin/core-chunks/handoff-storage-NGUA4Y2L.mjs +7 -0
- package/dist/bin/core-chunks/harness-V7J7WIT2.mjs +43 -0
- package/dist/bin/core-chunks/health-TNB5OC37.mjs +11 -0
- package/dist/bin/core-chunks/help-P7EYELVK.mjs +14 -0
- package/dist/bin/core-chunks/hooks-service-REI56DDC.mjs +91 -0
- package/dist/bin/core-chunks/infer-memory-file-ATP7PSAQ.mjs +7 -0
- package/dist/bin/core-chunks/install-FZQJJWT5.mjs +9 -0
- package/dist/bin/core-chunks/judgment-G5KH6QFC.mjs +21 -0
- package/dist/bin/core-chunks/judgment-ledger-storage-ZTYXPMM4.mjs +7 -0
- package/dist/bin/core-chunks/judgment-orchestrator-E3SO3NVE.mjs +7 -0
- package/dist/bin/core-chunks/judgment-receipt-GO6QEZQC.mjs +7 -0
- package/dist/bin/core-chunks/kimi-hooks-TR6J3OVG.mjs +7 -0
- package/dist/bin/core-chunks/kimi-mcp-ETG7O6O5.mjs +7 -0
- package/dist/bin/core-chunks/land-cue-3BUD3KJJ.mjs +8 -0
- package/dist/bin/core-chunks/land-rho-MCTQDPRH.mjs +8 -0
- package/dist/bin/core-chunks/land-synthesis-MU4EZEYL.mjs +7 -0
- package/dist/bin/core-chunks/lean-26BWCUOR.mjs +34 -0
- package/dist/bin/core-chunks/legacy-crew-sweep-G5UJT2PM.mjs +23 -0
- package/dist/bin/core-chunks/living-context-contract-HZIVBMXX.mjs +7 -0
- package/dist/bin/core-chunks/llm-KMVXVBHG.mjs +18 -0
- package/dist/bin/core-chunks/mcp-BD5TOTCK.mjs +17 -0
- package/dist/bin/core-chunks/memory-dream-6GFV2GXN.mjs +14 -0
- package/dist/bin/core-chunks/memory-export-WJ4H7CFV.mjs +13 -0
- package/dist/bin/core-chunks/memory-index-7NIU34EI.mjs +7 -0
- package/dist/bin/core-chunks/notification-G654IX3O.mjs +7 -0
- package/dist/bin/core-chunks/notify-EWYUBKGO.mjs +9 -0
- package/dist/bin/core-chunks/nyquist-lite-A23B7G4B.mjs +9 -0
- package/dist/bin/core-chunks/one-breath-install-LVNIVN6S.mjs +7 -0
- package/dist/bin/core-chunks/opencode-mcp-L7NC77JF.mjs +7 -0
- package/dist/bin/core-chunks/output-D27IOQXR.mjs +7 -0
- package/dist/bin/core-chunks/pack-integrity-X277OVRB.mjs +9 -0
- package/dist/bin/core-chunks/pack-manager-VN7F6R47.mjs +7 -0
- package/dist/bin/core-chunks/package-R4FUTGOE.mjs +7 -0
- package/dist/bin/core-chunks/package-legitimacy-VHHGI4P7.mjs +7 -0
- package/dist/bin/core-chunks/path-manager-E5DCU5LP.mjs +7 -0
- package/dist/bin/core-chunks/performance-tracker-BFBNR3LY.mjs +7 -0
- package/dist/bin/core-chunks/pi-skill-IZQEUILZ.mjs +7 -0
- package/dist/bin/core-chunks/planning-NOWLKZDS.mjs +8 -0
- package/dist/bin/core-chunks/post-edit-GTBY32JU.mjs +7 -0
- package/dist/bin/core-chunks/pr-convention-37YHTUKM.mjs +7 -0
- package/dist/bin/core-chunks/pre-bash-32ZOGNSP.mjs +10 -0
- package/dist/bin/core-chunks/pre-commit-7TU2A7H4.mjs +7 -0
- package/dist/bin/core-chunks/pre-edit-ASEWA5TS.mjs +8 -0
- package/dist/bin/core-chunks/pre-package-ZTZACEBB.mjs +7 -0
- package/dist/bin/core-chunks/pre-search-MKDRFJSE.mjs +8 -0
- package/dist/bin/core-chunks/pre-secrets-RJELPDFY.mjs +7 -0
- package/dist/bin/core-chunks/precision-classifier-AV75OEVA.mjs +7 -0
- package/dist/bin/core-chunks/precision-judgment-MCX4MIIG.mjs +7 -0
- package/dist/bin/core-chunks/preferences-KO5U2ELK.mjs +31 -0
- package/dist/bin/core-chunks/primitives-GNUMBYOK.mjs +13 -0
- package/dist/bin/core-chunks/prjct-md-BSFV7OQQ.mjs +7 -0
- package/dist/bin/core-chunks/product-GUHSUNIH.mjs +68 -0
- package/dist/bin/core-chunks/project-agent-surfaces-BXCJJXB7.mjs +7 -0
- package/dist/bin/core-chunks/project-alignment-ADKW3ZWQ.mjs +17 -0
- package/dist/bin/core-chunks/project-file-inventory-XIHHJZUP.mjs +7 -0
- package/dist/bin/core-chunks/project-memory-L5MDZYST.mjs +7 -0
- package/dist/bin/core-chunks/project-style-evolution-HIMSJQQB.mjs +7 -0
- package/dist/bin/core-chunks/prompt-47YP5JIR.mjs +25 -0
- package/dist/bin/core-chunks/protocol-4AJ4J5SI.mjs +7 -0
- package/dist/bin/core-chunks/provider-cache-IWVTFLGT.mjs +7 -0
- package/dist/bin/core-chunks/provider-status-HQUBKMH5.mjs +7 -0
- package/dist/bin/core-chunks/publish-helper-2T2EHM3V.mjs +7 -0
- package/dist/bin/core-chunks/purge-6SJKHKIY.mjs +7 -0
- package/dist/bin/core-chunks/queue-storage-BKH5XX2E.mjs +7 -0
- package/dist/bin/core-chunks/registry-YM2EYUXY.mjs +7 -0
- package/dist/bin/core-chunks/reliability-repair-JMPZWDD4.mjs +20 -0
- package/dist/bin/core-chunks/removed-verbs-EU3WPRNK.mjs +7 -0
- package/dist/bin/core-chunks/retention-QSXWKE4H.mjs +7 -0
- package/dist/bin/core-chunks/retro-B2EBN4TA.mjs +13 -0
- package/dist/bin/core-chunks/review-risk-LBPY5M3K.mjs +12 -0
- package/dist/bin/core-chunks/run-recorder-EZQ32M55.mjs +7 -0
- package/dist/bin/core-chunks/safe-artifacts-PE2TMEZQ.mjs +9 -0
- package/dist/bin/core-chunks/sdd-3WNZJ6FU.mjs +9 -0
- package/dist/bin/core-chunks/seed-MMDJE2UO.mjs +10 -0
- package/dist/bin/core-chunks/self-heal-R5FBXEVQ.mjs +7 -0
- package/dist/bin/core-chunks/session-continuity-OQDB5UYI.mjs +10 -0
- package/dist/bin/core-chunks/session-start-FM6UL7MT.mjs +7 -0
- package/dist/bin/core-chunks/session-tracker-RG2FBWMS.mjs +7 -0
- package/dist/bin/core-chunks/settings-installer-4XHM3HAZ.mjs +7 -0
- package/dist/bin/core-chunks/setup-BL36ZWPW.mjs +140 -0
- package/dist/bin/core-chunks/setup-V75BWRHU.mjs +38 -0
- package/dist/bin/core-chunks/shipping-NZVM57JJ.mjs +12 -0
- package/dist/bin/core-chunks/signals-digest-P5BG6MZF.mjs +7 -0
- package/dist/bin/core-chunks/skill-adherence-JE3N3Y67.mjs +13 -0
- package/dist/bin/core-chunks/skill-generator-LKS5BNMY.mjs +7 -0
- package/dist/bin/core-chunks/skill-index-L4UWQCQE.mjs +11 -0
- package/dist/bin/core-chunks/spec-VC3VTUI3.mjs +27 -0
- package/dist/bin/core-chunks/spec-context-inference-KOINWBC7.mjs +9 -0
- package/dist/bin/core-chunks/spec-inventory-2TT7BTFZ.mjs +9 -0
- package/dist/bin/core-chunks/spec-service-UZ53XL6X.mjs +7 -0
- package/dist/bin/core-chunks/spec-task-breakdown-3Y7YXCIQ.mjs +7 -0
- package/dist/bin/core-chunks/state-storage-6CGFWW5D.mjs +7 -0
- package/dist/bin/core-chunks/stdin-spill-Y2A6WOOW.mjs +7 -0
- package/dist/bin/core-chunks/stop-6SH36ULT.mjs +15 -0
- package/dist/bin/core-chunks/subagent-start-TVGBV2V2.mjs +7 -0
- package/dist/bin/core-chunks/subagent-stop-APWY6KMX.mjs +7 -0
- package/dist/bin/core-chunks/surface-attribution-CQVM2SWY.mjs +7 -0
- package/dist/bin/core-chunks/symbol-graph-PCS43SHZ.mjs +7 -0
- package/dist/bin/core-chunks/sync-analyzer-M37Q4LE4.mjs +7 -0
- package/dist/bin/core-chunks/sync-client-6TAOTJWR.mjs +7 -0
- package/dist/bin/core-chunks/sync-cursor-storage-GKO4X2QN.mjs +18 -0
- package/dist/bin/core-chunks/task-orchestration-GS4J4KGS.mjs +7 -0
- package/dist/bin/core-chunks/task-overview-XSMK7YEN.mjs +7 -0
- package/dist/bin/core-chunks/task-service-KFYL5NT4.mjs +7 -0
- package/dist/bin/core-chunks/tdd-P2PP4RR4.mjs +9 -0
- package/dist/bin/core-chunks/team-WKAAOEFE.mjs +42 -0
- package/dist/bin/core-chunks/template-loader-H4FE37HV.mjs +7 -0
- package/dist/bin/core-chunks/token-backfill-WPXXD5MP.mjs +12 -0
- package/dist/bin/core-chunks/token-economics-JZAQJUET.mjs +7 -0
- package/dist/bin/core-chunks/transcript-jsonl-OC7TH4Q3.mjs +7 -0
- package/dist/bin/core-chunks/trust-boundary-24F662RM.mjs +7 -0
- package/dist/bin/core-chunks/uninstall-W6EAUS7N.mjs +13 -0
- package/dist/bin/core-chunks/update-PSHEJJI5.mjs +11 -0
- package/dist/bin/core-chunks/update-checker-LZCUPWQB.mjs +7 -0
- package/dist/bin/core-chunks/usefulness-A3GRKFL3.mjs +7 -0
- package/dist/bin/core-chunks/user-home-BODIAXR4.mjs +7 -0
- package/dist/bin/core-chunks/vault-retire-notice-FDRT7BJG.mjs +8 -0
- package/dist/bin/core-chunks/velocity-storage-5T7RYOWH.mjs +7 -0
- package/dist/bin/core-chunks/verb-names-QWGYABFH.mjs +7 -0
- package/dist/bin/core-chunks/version-B5DBRVGQ.mjs +7 -0
- package/dist/bin/core-chunks/watch-service-7V3O52TW.mjs +9 -0
- package/dist/bin/core-chunks/weak-frontier-demo-ZCDTMYRO.mjs +7 -0
- package/dist/bin/core-chunks/weak-model-mode-LOAPFJPQ.mjs +7 -0
- package/dist/bin/core-chunks/work-graph-WHMCFN6U.mjs +7 -0
- package/dist/bin/core-chunks/work-graph-ZNV7S6EU.mjs +16 -0
- package/dist/bin/core-chunks/work-scope-XXPUH6TU.mjs +7 -0
- package/dist/bin/core-chunks/workflow-XM77QYRF.mjs +61 -0
- package/dist/bin/core-chunks/workflows-reference-T7RH7IGJ.mjs +7 -0
- package/dist/bin/core-chunks/workspace-occupancy-JUXKZBUZ.mjs +7 -0
- package/dist/bin/core-chunks/worktree-service-YRRPFU57.mjs +11 -0
- package/dist/bin/core-chunks/world-model-impact-FAGGNUGN.mjs +7 -0
- package/dist/bin/hook-chunks/{agent-switch-I4MTVE56.mjs → agent-switch-TAJWH2ZD.mjs} +1 -1
- package/dist/bin/hook-chunks/{analysis-VN7APBHR.mjs → analysis-34WDLUXK.mjs} +2 -2
- package/dist/bin/hook-chunks/{auto-flush-DX3FVSQE.mjs → auto-flush-7TIEBPPQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{capture-gate-MEIQD7ZS.mjs → capture-gate-JFVGG7RB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-UVATSTRF.mjs → chunk-22CBVTZ3.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-MW54MTLB.mjs → chunk-3JOZN7YJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-E7NA34VQ.mjs → chunk-4X3KUIXK.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-3AHW4XQH.mjs → chunk-5ALQBNIZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-H2DGDAQP.mjs → chunk-5VPZI2ZF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-XYKVWO23.mjs → chunk-6EHYPQ5U.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-6NMHVPAI.mjs +35 -0
- package/dist/bin/hook-chunks/chunk-7H5UVM6X.mjs +9 -0
- package/dist/bin/hook-chunks/{chunk-LR24AIEW.mjs → chunk-A3R47SP6.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-AFGXKRRP.mjs +12 -0
- package/dist/bin/hook-chunks/{chunk-64ZEBHDX.mjs → chunk-CGAKJDKT.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EI6VQZOX.mjs → chunk-CJY4Y5SO.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-FSFURDAE.mjs +16 -0
- package/dist/bin/hook-chunks/{chunk-ZZBNFNMG.mjs → chunk-FTBBQHI4.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-G4VJKPG7.mjs +69 -0
- package/dist/bin/hook-chunks/{chunk-7PBWIO4K.mjs → chunk-GAJOSSB4.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-DB226JIV.mjs → chunk-GER6HFWV.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-LQLCYBFF.mjs → chunk-H3GIYI4Q.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KDNUQPAK.mjs → chunk-HRU2KNEB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-33BHU4OM.mjs → chunk-LCGWETJ6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-WL6PKX3U.mjs → chunk-MG2DNP4Z.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-XV2LJVYB.mjs → chunk-MIJZT4ZR.mjs} +1 -1
- package/dist/bin/hook-chunks/chunk-NGB6JNSB.mjs +18 -0
- package/dist/bin/hook-chunks/{chunk-IJ523YO2.mjs → chunk-OALZUWC6.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EGCYDLSO.mjs → chunk-PZMBZ6GE.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-RT2DFIWF.mjs → chunk-QIB6Y6AH.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-ZQI4TJ5C.mjs → chunk-QMNZPNVY.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-YLOK4WRR.mjs → chunk-R4YDE3GU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-WJV24WE6.mjs → chunk-RFKRKUHB.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-SWJ7TLBD.mjs → chunk-RGOTJCZU.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-FZS3XGEA.mjs → chunk-RLKYEL3F.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-LF3S3MYE.mjs → chunk-T2KVL6PZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-NLL5AV2G.mjs → chunk-T7DRHVK3.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-KV4NXLPT.mjs → chunk-TWFLW6OJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-ADYTBOCZ.mjs → chunk-UJIOGFNP.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-Y3RHBU2R.mjs → chunk-UK24P7PV.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-OLQAMCYV.mjs → chunk-ULNGKZB6.mjs} +5 -5
- package/dist/bin/hook-chunks/{chunk-UMJ5D5I6.mjs → chunk-UWHVPO6X.mjs} +2 -2
- package/dist/bin/hook-chunks/{chunk-YHOZTAZH.mjs → chunk-V6GGH6H5.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-EXVL2OFE.mjs → chunk-XC2BSGWF.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-JZDZH6IV.mjs → chunk-YATXTHDL.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-DCHIPMOG.mjs → chunk-ZF2EVMY7.mjs} +1 -1
- package/dist/bin/hook-chunks/{chunk-PVCEWFHS.mjs → chunk-ZPAY2NSF.mjs} +2 -2
- package/dist/bin/hook-chunks/{codex-skill-6CRFUF3A.mjs → codex-skill-BFRU5FTP.mjs} +1 -1
- package/dist/bin/hook-chunks/{command-installer-MUHZWDZA.mjs → command-installer-3XOZGKOQ.mjs} +1 -1
- package/dist/bin/hook-chunks/{config-manager-2JJPCLKC.mjs → config-manager-UPB7NEXF.mjs} +1 -1
- package/dist/bin/hook-chunks/{context7-service-NH4BMGSJ.mjs → context7-service-7VFXEQVN.mjs} +1 -1
- package/dist/bin/hook-chunks/{cwd-changed-UTD6Y4MS.mjs → cwd-changed-USNJYUH7.mjs} +1 -1
- package/dist/bin/hook-chunks/{distill-5TNAM3LY.mjs → distill-47YVL7IH.mjs} +1 -1
- package/dist/bin/hook-chunks/{enriched-recall-6VOIUNLN.mjs → enriched-recall-CVYI52NO.mjs} +1 -1
- package/dist/bin/hook-chunks/{format-IIOFTSBF.mjs → format-DPIN45EG.mjs} +1 -1
- package/dist/bin/hook-chunks/{judgment-receipt-QLV3MYFT.mjs → judgment-receipt-G2DKQR7U.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-cue-57B23PEL.mjs → land-cue-3JD2TXFP.mjs} +1 -1
- package/dist/bin/hook-chunks/{land-synthesis-ZVPFJERV.mjs → land-synthesis-5C4KGCTB.mjs} +1 -1
- package/dist/bin/hook-chunks/{legacy-crew-sweep-GR6HRSHX.mjs → legacy-crew-sweep-XQNXNZES.mjs} +2 -2
- package/dist/bin/hook-chunks/{memory-index-XE2MWKQS.mjs → memory-index-LL6SQJ2N.mjs} +1 -1
- package/dist/bin/hook-chunks/{notification-GU2ZJP5K.mjs → notification-ACQBRJG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-integrity-WV5U3AFF.mjs → pack-integrity-DCXVRRJZ.mjs} +1 -1
- package/dist/bin/hook-chunks/{pack-manager-QLFQKP24.mjs → pack-manager-KYWKNYUY.mjs} +1 -1
- package/dist/bin/hook-chunks/{planning-VPAX5DZL.mjs → planning-KOU3XKWS.mjs} +2 -2
- package/dist/bin/hook-chunks/{post-edit-UXCFSR3Y.mjs → post-edit-CK2MYQEN.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-bash-MB4JNNYG.mjs → pre-bash-W5A5CTR3.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-commit-U7TRFKWX.mjs → pre-commit-5Q24RM4S.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-edit-MDCQXI5F.mjs → pre-edit-YIJ4BCYL.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-package-A6ZI5R64.mjs → pre-package-O4RMVA4T.mjs} +1 -1
- package/dist/bin/hook-chunks/{pre-search-ZZO3LGXJ.mjs → pre-search-WYOWC3D6.mjs} +1 -1
- package/dist/bin/hook-chunks/{prjct-md-MS52YLI2.mjs → prjct-md-2UVHFYTJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-agent-surfaces-6AIW7KL6.mjs → project-agent-surfaces-BKFYUMRV.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-memory-UDH56VFP.mjs → project-memory-OC5GTJPY.mjs} +1 -1
- package/dist/bin/hook-chunks/{project-style-evolution-IJXT2MCP.mjs → project-style-evolution-2IFJCACQ.mjs} +1 -1
- package/dist/bin/hook-chunks/prompt-JIWMP563.mjs +26 -0
- package/dist/bin/hook-chunks/{purge-N2WN6NDB.mjs → purge-FQK3Z4QS.mjs} +1 -1
- package/dist/bin/hook-chunks/{retention-RET4P2RO.mjs → retention-2FETBJFG.mjs} +1 -1
- package/dist/bin/hook-chunks/{sdd-PB6WKSLE.mjs → sdd-V43TSJ2P.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-continuity-BIJXMN44.mjs → session-continuity-RO2ACICF.mjs} +1 -1
- package/dist/bin/hook-chunks/{session-start-R2VMKW2L.mjs → session-start-FKKFMKQ5.mjs} +1 -1
- package/dist/bin/hook-chunks/{setup-PPIZHVXS.mjs → setup-YV2DKG5L.mjs} +2 -2
- package/dist/bin/hook-chunks/{shipping-C637PCOF.mjs → shipping-SCNFEXBY.mjs} +4 -4
- package/dist/bin/hook-chunks/{spec-context-inference-RTTDOZZO.mjs → spec-context-inference-BD3ANTXA.mjs} +1 -1
- package/dist/bin/hook-chunks/{spec-service-ENLAAMVL.mjs → spec-service-OWYOAGXS.mjs} +2 -2
- package/dist/bin/hook-chunks/{spec-task-breakdown-RUDEP3AY.mjs → spec-task-breakdown-HOTLUFDM.mjs} +1 -1
- package/dist/bin/hook-chunks/{state-storage-AJUPG7J5.mjs → state-storage-EMWLIFQJ.mjs} +1 -1
- package/dist/bin/hook-chunks/{stop-DPXAWJFN.mjs → stop-MIXT7WXA.mjs} +3 -3
- package/dist/bin/hook-chunks/{subagent-start-AFHPXL2S.mjs → subagent-start-NO3TN65K.mjs} +1 -1
- package/dist/bin/hook-chunks/{subagent-stop-5BMV63ML.mjs → subagent-stop-CKWIXX7W.mjs} +1 -1
- package/dist/bin/hook-chunks/{surface-attribution-EGIKCVMF.mjs → surface-attribution-BYESPLXM.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-overview-F3GB77OA.mjs → task-overview-P3VRH2FD.mjs} +1 -1
- package/dist/bin/hook-chunks/{task-service-FZABHPFV.mjs → task-service-5ONSBKKP.mjs} +1 -1
- package/dist/bin/hook-chunks/{tdd-TAMBOPN3.mjs → tdd-SESB4IG3.mjs} +1 -1
- package/dist/bin/hook-chunks/{template-loader-MXOMU4XH.mjs → template-loader-KO67FVHO.mjs} +1 -1
- package/dist/bin/hook-chunks/{weak-model-mode-BMSPGEQY.mjs → weak-model-mode-HPXBKXJT.mjs} +1 -1
- package/dist/bin/hook-chunks/{work-scope-YCS4GTXW.mjs → work-scope-RNPGACPA.mjs} +1 -1
- package/dist/bin/hook-chunks/{workspace-occupancy-JOBYNNXV.mjs → workspace-occupancy-3NEAXILW.mjs} +1 -1
- package/dist/bin/prjct-core.mjs +9 -3323
- package/dist/bin/prjct-hooks.mjs +1 -1
- package/dist/bin/prjct.mjs +7 -1
- package/dist/daemon/entry.mjs +591 -582
- package/dist/mcp/server.mjs +320 -313
- package/package.json +4 -2
- package/dist/bin/hook-chunks/chunk-3UB6SFRA.mjs +0 -11
- package/dist/bin/hook-chunks/chunk-D7DQABWO.mjs +0 -35
- package/dist/bin/hook-chunks/chunk-IWUF2LGO.mjs +0 -18
- package/dist/bin/hook-chunks/chunk-M4YM7Z3F.mjs +0 -69
- package/dist/bin/hook-chunks/chunk-TB57OYGW.mjs +0 -16
- package/dist/bin/hook-chunks/chunk-ZYCNW75E.mjs +0 -9
- package/dist/bin/hook-chunks/prompt-7VZLYONO.mjs +0 -24
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as b}from"./chunk-XBR63NJA.mjs";import{a as R,b as C}from"./chunk-UNIBFM6J.mjs";import"./chunk-XC6YAP36.mjs";import"./chunk-6U3MV7KZ.mjs";import"./chunk-VRFYDYQY.mjs";import{d as j}from"./chunk-6XTLPAPZ.mjs";import"./chunk-L5LFLI4R.mjs";import{a as u}from"./chunk-24EN5Y62.mjs";import"./chunk-AS3LWTQ4.mjs";import{b as p}from"./chunk-J6Y7IVFQ.mjs";import{b as w}from"./chunk-UAYTDSYG.mjs";import"./chunk-NNILF7R3.mjs";import"./chunk-NZKUCQZK.mjs";import"./chunk-H2KNJUPN.mjs";import{a as x}from"./chunk-5DZ2LTII.mjs";import"./chunk-FOWTB762.mjs";import"./chunk-6FUCOGOW.mjs";import"./chunk-6U3CYLY5.mjs";import"./chunk-ESB4ALH2.mjs";import{c as P}from"./chunk-Q3LUL6LL.mjs";import"./chunk-C7YBUD4K.mjs";import"./chunk-IOFCSTGM.mjs";import"./chunk-S6FBPXQL.mjs";import"./chunk-NOHSLOLL.mjs";import"./chunk-RCIWCKL7.mjs";import"./chunk-E73HSXCX.mjs";import"./chunk-76YMLNLF.mjs";import"./chunk-O5N6XYPU.mjs";import"./chunk-SROBBOJB.mjs";import"./chunk-CB3CNJTL.mjs";import"./chunk-LZILSE5H.mjs";import"./chunk-6OYLZ4NM.mjs";import"./chunk-SO3ZPNWT.mjs";import"./chunk-V7R3L54M.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-QZ7T2EYR.mjs";import"./chunk-UYMZ3NAF.mjs";import"./chunk-AJXELVNH.mjs";import"./chunk-CWLGRKA7.mjs";import"./chunk-2NI4EEK2.mjs";import"./chunk-5YLI5V3Q.mjs";import"./chunk-BUD3R6LF.mjs";import"./chunk-ZQ2XH76U.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import{a as k}from"./chunk-KUQLXY2P.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as i}from"./chunk-ID2C2S33.mjs";import"./chunk-RACISWUV.mjs";import"./chunk-DIEPWXJJ.mjs";import"./chunk-NINFE7GS.mjs";import"./chunk-UNNY2IWZ.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-TIBYHZFA.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as v}from"./chunk-3TRXQAU4.mjs";var E=["blocks","parent","related","discovered-from"],_=class extends x{static{v(this,"WorkGraphCommands")}async ready(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=u.ready(t.value),e=b(t.value,o);if(e.length===0){let n="Nothing ready \u2014 the backlog is empty or fully blocked. `prjct phases --md` shows why.";return s.md?console.log(`> ${n}`):i.info(n),{success:!0,ready:0}}if(s.md){let n=[`# Ready frontier \u2014 ${e.length} unblocked item(s) (impact-ranked)`,"","| Id | Item | Priority | Unblocks | Score | Claimed |","|---|---|---|---:|---:|---|"];for(let r of e)n.push(`| \`${r.id.slice(0,8)}\` | ${r.description.slice(0,80)} | ${r.priority??"-"} | ${r.unblocks} | ${Math.round(r.impactScore)} | ${r.claimedBy??"\u2014"} |`);n.push("",`Top rationale: ${e[0]?.why??"\u2014"}`,"","Claim before working: `prjct claim <id>`. Full id via `prjct sync --md`."),console.log(n.join(`
|
|
8
|
+
`))}else{i.info(`${e.length} ready item(s) (impact-ranked):`);for(let n of e)i.info(` \u2022 [${n.id.slice(0,8)}] ${n.description.slice(0,80)}`);e[0]?.why&&i.info(` ${e[0].why}`)}return{success:!0,ready:e.length,items:e}}async next(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let e=b(t.value,u.ready(t.value,{unclaimedOnly:!0,limit:20}))[0]??null;if(!e){let l="No unclaimed ready work. `prjct ready --md` for the frontier.";return s.md?console.log(`> ${l}`):i.info(l),{success:!0,next:null}}let n=w(e.description),r=P(n);if(s.md){let l=[`# Next: ${e.description}`,"",`- Id: \`${e.id}\` \xB7 priority: ${e.priority??"-"} \xB7 unblocks ${e.unblocks} item(s) \xB7 impactScore ${Math.round(e.impactScore)}`,`- ${e.why}`,`- Orchestration: ${r.model}/${r.effort} \xB7 spec: ${r.spec} \xB7 tests: ${r.tests} \xB7 fan-out: ${r.fanout} \xB7 ~${r.expectedPoints} pt`,"",`Claim it: \`prjct claim ${e.id}\` \u2014 then \`prjct work "${e.description.slice(0,60)}"\``];console.log(l.join(`
|
|
9
|
+
`))}else i.info(`next: [${e.id.slice(0,8)}] ${e.description}`),i.info(` ${e.why}`);return{success:!0,next:e,orchestration:r,why:e.why}}async claim(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=await this.resolveId(t.value,(c??"").trim());if(!o)return this.fail("Usage: prjct claim <task-id>",s);let e=s.as??process.env.PRJCT_AGENT??await(async()=>{let{pickCodename:l}=await import("./agent-codenames-7N4DU62I.mjs"),m=u.ready(t.value,{limit:50}).map(d=>d.claimedBy).filter(d=>!!d);return l(`claim:${o}:${Date.now()}`,m)})(),n=u.claim(t.value,o,e),r=n?`claimed ${o.slice(0,8)} as ${e}`:`claim lost \u2014 ${o.slice(0,8)} is already taken`;return s.md?console.log(`${n?"\u2713":"\u2717"} ${r}`):n?i.done(r):i.fail(r),{success:n,id:o,claimant:e}}async depend(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=(c??"").trim();if(!o||!s.on)return this.fail("Usage: prjct depend <id> --on <id> [--type blocks|parent|related|discovered-from]",s);let e=s.type??"blocks";if(!E.includes(e))return this.fail(`Unknown dep type '${s.type}'. Use: ${E.join(" | ")}`,s);let n=await this.resolveId(t.value,o),r=await this.resolveId(t.value,s.on.trim());if(!n||!r)return this.fail("Could not resolve one of the ids",s);try{u.addDependency(t.value,n,r,e)}catch(m){return this.fail(m instanceof Error?m.message:"dependency rejected",s)}let l=`${n.slice(0,8)} \u2014${e}\u2192 ${r.slice(0,8)}`;return s.md?console.log(`\u2713 ${l}`):i.done(l),{success:!0,fromId:n,toId:r,depType:e}}async phases(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=u.phases(t.value);if(o.length===0){let e="No open work in the graph.";return s.md?console.log(`> ${e}`):i.info(e),{success:!0,phases:0}}if(s.md){let e=["# Execution phases (topological)","","Items in the SAME phase have no dependency path between them \u2014 safe to fan out in parallel.",""];for(let r of o){e.push(`## Phase ${r.phase} \u2014 ${r.items.length} item(s), parallelizable`);for(let l of r.items.slice(0,12)){let m=w(l.description),d=P(m);e.push(`- \`${l.id.slice(0,8)}\` ${l.description.slice(0,80)} _(${d.model}/${d.effort}, ~${d.expectedPoints} pt)_`)}r.items.length>12&&e.push(`- _\u2026and ${r.items.length-12} more (full list in --json / prjct ready)_`),e.push("")}console.log(e.join(`
|
|
10
|
+
`))}else for(let e of o)i.info(`phase ${e.phase}: ${e.items.length} item(s)`);return{success:!0,phases:o.length,plan:o}}async expand(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=(c??"").trim().split(/\s+(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(d=>d.replace(/^"|"$/g,"")).filter(Boolean),e=o[0];if(!e)return this.fail('Usage: prjct expand <id> ["subtask 1" "subtask 2" ...]',s);let n=await this.resolveId(t.value,e);if(!n)return this.fail(`Unknown item '${e}'`,s);let r=o.slice(1);if(r.length===0){let h=(await k.getTasks(t.value)).find(g=>g.id===n)?.description??n,f=u.getComplexity(t.value,n)??(()=>{let g=w(h),$=P(g),y={score:$.expectedPoints,recommendedSubtasks:$.expectedPoints>=5?Math.min($.expectedPoints,6):0,expansionPrompt:`Decompose "${h}" into ${Math.min($.expectedPoints,6)} independent, testable subtasks; make dependencies explicit; each subtask \u2264 2 points.`,reasoning:`Triage level ${g.level}; ~${$.expectedPoints} points.`};return u.recordComplexity(t.value,n,{score:y.score,recommendedSubtasks:y.recommendedSubtasks,expansionPrompt:y.expansionPrompt??void 0,reasoning:y.reasoning??void 0}),y})();if(s.md){let g=[`# Expand \`${n.slice(0,8)}\` \u2014 ${h.slice(0,90)}`,"",`- Complexity: ${f.score} pt \xB7 recommended subtasks: ${f.recommendedSubtasks}`,...f.reasoning?[`- Reasoning: ${f.reasoning}`]:[],"",f.recommendedSubtasks>0?`${f.expansionPrompt}
|
|
11
|
+
|
|
12
|
+
Persist your decomposition: \`prjct expand ${n.slice(0,8)} "subtask 1" "subtask 2" ...\``:"Small enough \u2014 no decomposition needed. Work it directly."];console.log(g.join(`
|
|
13
|
+
`))}else i.info(`complexity ${f.score} pt, recommended subtasks: ${f.recommendedSubtasks}`);return{success:!0,id:n,complexity:f}}let l=[];for(let d of r){let h=await k.addTask(t.value,{description:d,section:"active",type:"feature",priority:"medium"});u.addDependency(t.value,n,h.id,"parent"),l.push(h.id)}let m=`expanded into ${l.length} subtask(s); parent is blocked until they complete`;return s.md?console.log(`\u2713 ${m}`):i.done(m),{success:!0,id:n,created:l}}async switch(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=(c??"").trim().split(/\s+/).filter(Boolean)[0];if(!o)return this.fail('Usage: prjct switch <agent> [--reason "\u2026"] [--launch]',s);let e=await R(t.value,a,o,{reason:s.reason,launch:s.launch,md:s.md});if(!e.ok)return this.fail(e.error??"switch failed",s);let n=e.handoff;return s.md?(console.log(e.resumeCard??""),e.launched?console.log(`
|
|
14
|
+
_Launched target CLI (best-effort)._`):e.launchError&&console.log(`
|
|
15
|
+
_Launch skipped: ${e.launchError}_`)):(i.done(`Yielded ${n.taskId.slice(0,8)} \u2192 ${n.toAgent} (${n.id.slice(0,16)})`),i.info(`Reason: ${n.reason}`),i.info(`Accept: prjct accept ${n.id}`),e.launched?i.info("Launched target CLI (best-effort)"):e.launchError&&i.info(`Launch skipped: ${e.launchError}`)),{success:!0,handoffId:n.id,taskId:n.taskId,toAgent:n.toAgent,launched:e.launched??!1}}async accept(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=(c??"").trim().split(/\s+/).filter(Boolean)[0]??null,e=await C(t.value,a,o);return e.ok?(s.md?console.log(e.brief??""):(i.done(`Accepted ${e.handoff.id.slice(0,16)} \u2014 cycle is yours`),i.info(`Task: ${e.handoff.taskId.slice(0,8)} \xB7 ${e.handoff.taskDescription}`),i.info(`Why yielded: ${e.handoff.reason}`),i.info("Next: prjct work --md (same cycle; do not restart)")),{success:!0,handoffId:e.handoff.id,taskId:e.handoff.taskId}):this.fail(e.error??"accept failed",s)}async handoffs(c=null,a=process.cwd(),s={}){let t=await p(a,s);if(!t.ok)return t.result;let o=j(t.value,{limit:20});if(o.length===0){let e='No handoffs yet. Yield with `prjct switch <agent> --reason "\u2026"`.';return s.md?console.log(`> ${e}`):i.info(e),{success:!0,count:0}}if(s.md){let e=[`# Handoffs (${o.length})`,"","| Id | Status | From \u2192 To | Task | Reason |","|---|---|---|---|---|"];for(let n of o)e.push(`| \`${n.id.slice(0,14)}\` | ${n.status} | ${n.fromAgent} \u2192 ${n.toAgent} | \`${n.taskId.slice(0,8)}\` | ${n.reason.slice(0,60)} |`);e.push("","Accept: `prjct accept <id>`"),console.log(e.join(`
|
|
16
|
+
`))}else for(let e of o)i.info(`[${e.status}] ${e.id.slice(0,14)} ${e.fromAgent}\u2192${e.toAgent} ${e.taskId.slice(0,8)} \u2014 ${e.reason.slice(0,50)}`);return{success:!0,count:o.length,handoffs:o}}async resolveId(c,a){if(!a)return null;let s=await k.getTasks(c),t=s.find(e=>e.id===a);if(t)return t.id;let o=s.filter(e=>e.id.startsWith(a));return o.length===1?o[0].id:null}fail(c,a){return a.md?console.log(`> ${c}`):i.fail(c),{success:!1,error:c}}};export{_ as WorkGraphCommands};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a,b,c,d,e,f}from"./chunk-CB3CNJTL.mjs";import"./chunk-LZILSE5H.mjs";import"./chunk-6OYLZ4NM.mjs";import"./chunk-V7R3L54M.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-QZ7T2EYR.mjs";import"./chunk-AJXELVNH.mjs";import"./chunk-CWLGRKA7.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";export{c as extractFilePathsFromEntries,d as formatWorkScopeBlock,f as isUsefulScopePath,b as resolveWorkScope,a as resolveWorkScopeSync,e as toLikelyFileHits};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{i as we}from"./chunk-YQ6HM3YO.mjs";import{a as le,c as ae}from"./chunk-TDTPDVUM.mjs";import{a as de}from"./chunk-GTG67Z45.mjs";import{b as D,d as F}from"./chunk-J6Y7IVFQ.mjs";import{a as z,c as me,d as ue,e as fe}from"./chunk-UAYTDSYG.mjs";import{b as ce}from"./chunk-NNILF7R3.mjs";import{a as $}from"./chunk-NZKUCQZK.mjs";import"./chunk-H2KNJUPN.mjs";import{a as h,b as se,d as g,e as b,f as K,g as y,i as S,l as ie}from"./chunk-6POAOY5C.mjs";import{a as pe}from"./chunk-5DZ2LTII.mjs";import{b as M,c as v,d as k,f as re}from"./chunk-FOWTB762.mjs";import{a as ne}from"./chunk-6FUCOGOW.mjs";import"./chunk-6U3CYLY5.mjs";import"./chunk-Q3LUL6LL.mjs";import"./chunk-C7YBUD4K.mjs";import"./chunk-IOFCSTGM.mjs";import"./chunk-S6FBPXQL.mjs";import"./chunk-NOHSLOLL.mjs";import"./chunk-RCIWCKL7.mjs";import"./chunk-E73HSXCX.mjs";import"./chunk-76YMLNLF.mjs";import"./chunk-O5N6XYPU.mjs";import"./chunk-SROBBOJB.mjs";import"./chunk-CB3CNJTL.mjs";import"./chunk-LZILSE5H.mjs";import"./chunk-6OYLZ4NM.mjs";import"./chunk-SO3ZPNWT.mjs";import"./chunk-V7R3L54M.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-QZ7T2EYR.mjs";import{a as O}from"./chunk-UYMZ3NAF.mjs";import"./chunk-AJXELVNH.mjs";import"./chunk-CWLGRKA7.mjs";import"./chunk-2NI4EEK2.mjs";import"./chunk-BUD3R6LF.mjs";import"./chunk-ZQ2XH76U.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-HCPQZRR3.mjs";import{b as oe}from"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import{h as m}from"./chunk-ID2C2S33.mjs";import"./chunk-RACISWUV.mjs";import"./chunk-DIEPWXJJ.mjs";import"./chunk-NINFE7GS.mjs";import"./chunk-UNNY2IWZ.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-TIBYHZFA.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import{l as te,p as Ue}from"./chunk-HYIT7MF5.mjs";import{a as ee,e as T,g as q}from"./chunk-225DWS4D.mjs";import{a as u}from"./chunk-3TRXQAU4.mjs";q();var De=[{type:"help",patterns:/^help\b/i},{type:"add",patterns:/^add\b/i},{type:"gate",patterns:/^gate\b/i},{type:"instruction",patterns:/^instruction\b/i},{type:"remove",patterns:/^rm\b/i},{type:"reset",patterns:/^reset\b/i},{type:"init",patterns:/^init\b/i},{type:"create",patterns:/^(?:create|new)\b/i},{type:"list",patterns:/^list\b/i},{type:"delete",patterns:/^delete\b/i},{type:"run",patterns:/^run\b/i},{type:"disable",patterns:/^disable\b/i},{type:"view",patterns:/^(?:show|view)\b/i}];function ge(c){let n=c.trim();for(let{type:r,patterns:e}of De){let s=n.match(e);if(s){let t=s[0],o=n.slice(t.length).trim();return{type:r,args:o,confidence:"exact"}}}return{type:"view",args:n,confidence:"exact"}}u(ge,"detectIntent");function G(c){let n=c.trim();if(n.startsWith('"')){let e=n.indexOf('"',1);return e===-1?[n.slice(1),""]:[n.slice(1,e),n.slice(e+1).trim()]}if(n.startsWith("'")){let e=n.indexOf("'",1);return e===-1?[n.slice(1),""]:[n.slice(1,e),n.slice(e+1).trim()]}let r=n.match(/^(.+?)\s+(before|after)\s+/i);return r?[r[1].trim(),n.slice(r[1].length).trim()]:[n,""]}u(G,"parseAction");function he(c,n){let r=n.toLowerCase();return c.filter(e=>e.action.toLowerCase().includes(r)||(e.description?.toLowerCase().includes(r)??!1)||e.command.toLowerCase().includes(r)||String(e.id)===r)}u(he,"searchRules");var P={HOOK_DEFAULT_MS:6e4,GATE_DEFAULT_MS:6e4,GATE_QUICK_MS:5e3,STEP_LINT_MS:12e4,STEP_TEST_MS:3e5,INSTRUCTION_MS:0};var Q=["task","done","ship","sync"],ke=["before","after"];function H(){return{description:null,enabled:!0,sortOrder:0,createdAt:new Date().toISOString()}}u(H,"newRuleDefaults");function be(c,n){return c.slice(c.indexOf(n)+n.length).trim()}u(be,"restAfterWorkflowName");async function ye(c,n,r){let[e,s]=G(c);if(!e||!s)return k('Usage: prjct workflow add "command" before|after <task|done|ship|sync>',r);let t=s.split(/\s+/),o=t[0]?.toLowerCase(),d=t[1]?.toLowerCase();if(!o||!ke.includes(o))return k('Position must be "before" or "after"',r);let i=F(n,d,r);if(!i.ok)return i.result;let a=$.addRule(n,{type:"hook",command:i.value.name,position:o,action:e,timeoutMs:P.HOOK_DEFAULT_MS,...H()});return r.md?console.log(h(S("Rule Added",`#${a} [hook] ${o} ${i.value.name} \u2192 \`${e}\``),y([{label:"View all rules",command:"prjct workflow --md"},{label:"Remove this rule",command:`prjct workflow rm ${a} --md`}]))):v(`rule #${a} added: [hook] ${o} ${i.value.name} \u2192 ${e}`),{success:!0,ruleId:a}}u(ye,"workflowAdd");async function Re(c,n,r){let e=c.trim().split(/\s+/)[0]?.toLowerCase(),s=F(n,e,r);if(!s.ok)return s.result;let t=be(c,s.value.name),[o]=G(t);if(!o)return k('Usage: prjct workflow gate <command> "shell command"',r);let d=$.addRule(n,{type:"gate",command:s.value.name,position:"before",action:o,timeoutMs:P.GATE_DEFAULT_MS,...H()});return r.md?console.log(h(S("Gate Added",`#${d} [gate] before ${s.value.name} \u2192 \`${o}\``),y([{label:"View all rules",command:"prjct workflow --md"},{label:"Remove this gate",command:`prjct workflow rm ${d} --md`}]))):v(`gate #${d} added: before ${s.value.name} \u2192 ${o}`),{success:!0,ruleId:d}}u(Re,"workflowGate");async function Se(c,n,r){let e=c.trim().split(/\s+/)[0]?.toLowerCase(),s=F(n,e,r);if(!s.ok)return s.result;let t=be(c,s.value.name),o=t.match(/^(before|after)\s+/i);if(!o)return k('Usage: prjct workflow instruction <command> before|after "instruction text"',r);let d=o[1].toLowerCase(),i=t.slice(o[0].length).trim(),[a]=G(i);if(!a)return k('Usage: prjct workflow instruction <command> before|after "instruction text"',r);let l=$.addRule(n,{type:"instruction",command:s.value.name,position:d,action:a,timeoutMs:P.INSTRUCTION_MS,...H()});return r.md?console.log(h(S("Instruction Added",`#${l} [instruction] ${d} ${s.value.name} \u2192 \`${a}\``),y([{label:"View all rules",command:"prjct workflow --md"},{label:"Remove this rule",command:`prjct workflow rm ${l} --md`}]))):v(`instruction #${l} added: ${d} ${s.value.name} \u2192 ${a}`),{success:!0,ruleId:l}}u(Se,"workflowInstruction");async function ve(c,n,r){let e=parseInt(c.trim(),10);return Number.isNaN(e)?k("Usage: prjct workflow rm <rule-id>",r):$.removeRule(n,e)?(r.md?console.log(h(S("Rule Removed",`Removed rule #${e}`))):v(`removed rule #${e}`),{success:!0}):k(`Rule #${e} not found`,r)}u(ve,"workflowRm");async function je(c,n){let r=$.resetRules(c),e=`Removed ${r} rule${r!==1?"s":""}`;return n.md?console.log(h(S("Rules Reset",e))):v(`reset: ${e.toLowerCase()}`),{success:!0,count:r}}u(je,"workflowReset");async function xe(c,n,r){let e=c.trim(),s=parseInt(e,10);if(!Number.isNaN(s)){let l=$.getRuleById(n,s);if(!l)return k(`Rule #${s} not found`,r);if(!l.enabled){let f=`Rule #${s} is already disabled`;return r.md?console.log(`> ${f}`):M(f),{success:!0,message:f}}return $.updateRule(n,s,{enabled:!1}),r.md?console.log(h(S("Rule Disabled",`#${s} [${l.type}] ${l.action}`),y([{label:"Re-enable this rule",command:`prjct workflow enable ${s} --md`},{label:"View all rules",command:"prjct workflow --md"}]))):v(`disabled rule #${s}: ${l.action}`),{success:!0,ruleId:s}}let t=$.getAllRules(n),o=he(t,e);if(o.length===0)return k(`No rules matching "${e}"`,r);if(o.length===1){let l=o[0];return $.updateRule(n,l.id,{enabled:!1}),r.md?console.log(h(S("Rule Disabled",`#${l.id} [${l.type}] ${l.action}`))):v(`disabled rule #${l.id}: ${l.action}`),{success:!0,ruleId:l.id}}let d=o.slice(0,5),i=o.length-5,a=i>0?`...and ${i} more`:null;if(r.md){let l=d.map(f=>`#${f.id} [${f.type}] ${f.position} ${f.command} -> \`${f.action}\``);a&&l.push(a),console.log(h(g("Multiple matches",`${o.length} rules match "${e}"`),b(l),y(d.map(f=>({label:`Disable #${f.id}`,command:`prjct workflow disable ${f.id} --md`})))))}else{M(`${o.length} rules match "${e}" \u2014 specify an ID:`);for(let l of d)console.log(` #${l.id} [${l.type}] ${l.position} ${l.command} -> ${l.action}`);a&&console.log(` ${a}`)}return{success:!0,matches:o.map(l=>l.id)}}u(xe,"workflowDisable");function Te(c,n){let r=n.filter(p=>p.type==="gate"&&p.position==="before"),e=n.filter(p=>p.type==="instruction"&&p.position==="before"),s=n.filter(p=>p.type==="hook"&&p.position==="before"),t=n.filter(p=>p.type==="step"&&p.position==="before"),o=n.filter(p=>p.type==="instruction"&&p.position==="after"),d=n.filter(p=>p.type==="hook"&&p.position==="after"),i=n.filter(p=>p.type==="step"&&p.position==="after"),a=[],l=u((p,L,C)=>{let R=L.map(W=>` ${W.enabled?C:"o"} #${W.id} ${W.action}`),A=[p,...R],I=Math.max(...A.map(W=>W.length))+2;a.push(`+${"-".repeat(I)}+`);for(let W of A)a.push(`| ${W.padEnd(I-1)}|`);a.push(`+${"-".repeat(I)}+`)},"drawBox"),f=u(p=>{p.push(" |"),p.push(" v")},"arrow");return r.length>0&&(l("GATES (must pass)",r,"#"),f(a)),e.length>0&&(l("INSTRUCTIONS (before)",e,"\u{1F4CB}"),f(a)),s.length>0&&(l("HOOKS (before)",s,">"),f(a)),t.length>0&&(l("STEPS (before)",t,">"),f(a)),a.push(` [ ${c.toUpperCase()} ]`),o.length>0&&(f(a),l("INSTRUCTIONS (after)",o,"\u{1F4CB}")),d.length>0&&(f(a),l("HOOKS (after)",d,">")),i.length>0&&(f(a),l("STEPS (after)",i,">")),a.join(`
|
|
8
|
+
`)}u(Te,"buildFlowDiagram");async function Ae(c){return c.md?console.log(h(g("Workflow Help","Manage hooks, gates, and steps for your workflow"),g("Commands",b(["`prjct workflow` \u2014 View all rules","`prjct workflow ship` \u2014 View rules for a command",'`prjct workflow add "npm test" before ship` \u2014 Add a hook','`prjct workflow gate ship "npm test"` \u2014 Add a blocking gate','`prjct workflow instruction ship after "Post review in Linear"` \u2014 Add an agent instruction',"`prjct workflow disable 3` \u2014 Disable rule #3","`prjct workflow rm 3` \u2014 Remove rule #3","`prjct workflow reset` \u2014 Remove all rules","`prjct workflow init` \u2014 Seed defaults from project"])),g("Natural Language (EN/ES)",b(['`prjct workflow "show ship rules"` \u2014 muestra / show / list / ver','`prjct workflow "add npm test before ship"` \u2014 a\xF1ade / add / agrega / pon','`prjct workflow "remove 3"` \u2014 quita / remove / elimina / borra','`prjct workflow "disable lint"` \u2014 deshabilita / disable / apaga','`prjct workflow "gate ship npm test"` \u2014 gate / bloquea'])))):(console.log(""),console.log("WORKFLOW HELP"),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log(""),console.log(" Commands:"),console.log(" prjct workflow View all rules"),console.log(" prjct workflow <command> View rules for command"),console.log(' prjct workflow add "cmd" before ship Add a hook'),console.log(' prjct workflow gate ship "cmd" Add a blocking gate'),console.log(' prjct workflow instruction ship after "text" Add an agent instruction'),console.log(" prjct workflow disable <id|query> Disable a rule"),console.log(" prjct workflow rm <id> Remove a rule"),console.log(" prjct workflow reset Remove all rules"),console.log(" prjct workflow init Seed defaults"),console.log(""),console.log(" Natural language (EN/ES):"),console.log(" show/muestra add/a\xF1ade remove/quita disable/deshabilita gate/bloquea"),console.log("")),{success:!0}}u(Ae,"workflowHelp");async function B(c,n,r){let e=c!==null&&Q.includes(c),s=e?$.getRulesForCommand(n,c):$.getAllRules(n);if(s.length===0)return r.md?console.log(h(g("Workflow Rules","No rules configured"),y([{label:"Add a hook",command:'prjct workflow add "npm test" before ship --md'},{label:"Add a gate",command:'prjct workflow gate ship "npm test" --md'}]))):(M("no workflow rules configured"),console.log(""),console.log(' Add a hook: prjct workflow add "npm test" before ship'),console.log(' Add a gate: prjct workflow gate ship "npm test"'),console.log(" Reset all: prjct workflow reset")),{success:!0,rules:[]};if(r.md){let t=e?[c]:Q,o=[];for(let a of t){let l=s.filter(f=>f.command===a);l.length!==0&&o.push(Te(a,l))}let d=e?`Workflow: ${c}`:"Workflow Rules",i=`${s.length} rule${s.length!==1?"s":""}`;console.log(h(g(d,i),o.length>0?se(o.join(`
|
|
9
|
+
|
|
10
|
+
`),""):null,y([{label:"Add a hook",command:'prjct workflow add "cmd" before ship --md'},{label:"Add a gate",command:'prjct workflow gate ship "cmd" --md'},{label:"Remove a rule",command:"prjct workflow rm <id> --md"}])))}else{let t=e?`WORKFLOW RULES: ${c.toUpperCase()}`:"WORKFLOW RULES";console.log(""),console.log(t),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");for(let o of s){let d=o.enabled?"":" (disabled)";console.log(` #${o.id} [${o.type}] ${o.position.padEnd(6)} ${o.command.padEnd(5)} \u2192 ${o.action}${d}`)}console.log(""),console.log("Commands: add | gate | rm | reset")}return{success:!0,rules:s}}u(B,"workflowShow");q();Ue();import X from"node:fs/promises";import Fe from"node:os";import V from"node:path";var Y=class{static{u(this,"TemplateGenerator")}commandsPath;constructor(){this.commandsPath=V.join(Fe.homedir(),".claude","commands","p")}async generateWorkflowTemplate(n,r){try{await X.mkdir(this.commandsPath,{recursive:!0});let e=V.join(this.commandsPath,`${n}.md`),s=this.buildTemplateContent(n,r);return await X.writeFile(e,s,"utf-8"),{success:!0,path:e}}catch(e){return{success:!1,error:T(e)}}}async deleteWorkflowTemplate(n){try{let r=V.join(this.commandsPath,`${n}.md`);return await X.unlink(r),{success:!0}}catch(r){return ee(r)?{success:!0}:{success:!1,error:T(r)}}}async templateExists(n){let r=V.join(this.commandsPath,`${n}.md`);return te(r)}buildTemplateContent(n,r){return`---
|
|
11
|
+
allowed-tools: [Bash, Read, Write, Edit, Glob, Grep, Task, AskUserQuestion]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# p. ${n} $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
## Description
|
|
17
|
+
${r}
|
|
18
|
+
|
|
19
|
+
## Step 1: Get workflow context
|
|
20
|
+
|
|
21
|
+
Execute the workflow to get current configuration:
|
|
22
|
+
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
prjct workflow run ${n} --md
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
27
|
+
## Step 2: Execute workflow
|
|
28
|
+
|
|
29
|
+
The CLI will execute all configured rules for this workflow:
|
|
30
|
+
|
|
31
|
+
- **Gates** (before) - must pass to continue
|
|
32
|
+
- **Hooks** (before/after) - run but don't block
|
|
33
|
+
- **Steps** (before/after) - blocking execution
|
|
34
|
+
|
|
35
|
+
## Step 3: Review results
|
|
36
|
+
|
|
37
|
+
Present the workflow execution results to the user. If gates failed, explain which checks didn't pass and suggest next steps.
|
|
38
|
+
|
|
39
|
+
## Next Steps
|
|
40
|
+
|
|
41
|
+
Suggest relevant actions based on the workflow results:
|
|
42
|
+
|
|
43
|
+
- View rules: \`prjct workflow ${n} --md\`
|
|
44
|
+
- Add rules: \`prjct workflow add "command" before ${n} --md\`
|
|
45
|
+
- Run again: \`p. ${n}\`
|
|
46
|
+
`}},J=new Y;q();async function We(c,n,r){let e=$.getRulesForCommand(c,"ship").filter(i=>i.position==="before");if(e.length>0)return k(`Ship workflow already has ${e.length} rule${e.length!==1?"s":""}. Use 'prjct workflow reset' first if you want to reinitialize.`,r);let s=await ne(n),t=[],o=u(()=>new Date().toISOString(),"ts"),d=$.addRule(c,{type:"gate",command:"ship",position:"before",action:'git branch --show-current | grep -vE "^(main|master)$"',description:"Prevent shipping from main branch",enabled:!0,timeoutMs:P.GATE_QUICK_MS,sortOrder:0,createdAt:o()});if(t.push(`#${d} [gate] prevent main branch`),s.lint){let i=$.addRule(c,{type:"step",command:"ship",position:"before",action:`${s.lint.command} || true`,description:"Lint code",enabled:!0,timeoutMs:P.STEP_LINT_MS,sortOrder:1,createdAt:o()});t.push(`#${i} [step] lint \u2192 ${s.lint.command}`)}if(s.test){let i=$.addRule(c,{type:"step",command:"ship",position:"before",action:`${s.test.command} || true`,description:"Run tests",enabled:!0,timeoutMs:P.STEP_TEST_MS,sortOrder:s.lint?2:1,createdAt:o()});t.push(`#${i} [step] test \u2192 ${s.test.command}`)}if(r.md)console.log(h(S("Workflow Initialized",`Added ${t.length} default ship rules`),b(t),y([{label:"View all rules",command:"prjct workflow --md"},{label:"Ship your work",command:"prjct ship --md"}])));else{v(`initialized ${t.length} workflow rules for ship`);for(let i of t)console.log(` ${i}`)}return{success:!0,rulesAdded:t.length}}u(We,"workflowInit");async function Oe(c,n,r,e){let s=c.match(/^(\S+)\s+"([^"]+)"/);if(!s)return k('Usage: prjct workflow create <name> "description"',e);let[,t,o]=s;if(!O.isValidName(t))return k('Workflow name must be lowercase alphanumeric + hyphens (e.g., "qa", "deploy-prod")',e);if(O.isReservedName(t))return k(`Workflow name '${t}' is reserved`,e);if(O.getWorkflow(n,t))return k(`Workflow '${t}' already exists`,e);try{let d=O.createWorkflow(n,{name:t,description:o}),i=await J.generateWorkflowTemplate(t,o);return i.success?(e.md?console.log(h(S("Workflow Created",`Created workflow: ${t}`),g("Description",o),g("Template",`Installed at ${i.path}`),y([{label:"Add rules",command:`prjct workflow add "action" before ${t} --md`},{label:"View workflow",command:`prjct workflow ${t} --md`},{label:"Run workflow",command:`p. ${t}`}]))):(v(`created workflow: ${t}`),console.log(` ${o}`),console.log(` Template: ${i.path}`),console.log(`
|
|
47
|
+
Run with: p. ${t}`)),{success:!0,workflowId:d,name:t,templatePath:i.path}):(O.deleteWorkflow(n,t),k(`Failed to generate template: ${i.error}`,e))}catch(d){return k(T(d),e)}}u(Oe,"workflowCreate");async function Ce(c,n){let r=O.getAllWorkflows(c);if(r.length===0)return n.md?console.log("> No workflows found"):M("No workflows found"),{success:!0,workflows:[]};let e=r.filter(o=>o.isBuiltin),s=r.filter(o=>!o.isBuiltin),t=u(o=>`- **${o.name}** \u2014 ${o.description??""}`,"renderRow");if(n.md){let o=[];e.length>0&&o.push(g("Built-in Workflows",e.map(t).join(`
|
|
48
|
+
`))),s.length>0&&o.push(g("Custom Workflows",s.map(t).join(`
|
|
49
|
+
`))),console.log(h(...o,y([{label:"Create workflow",command:'prjct workflow create <name> "description" --md'},{label:"View workflow",command:"prjct workflow <name> --md"}])))}else{if(v(`${r.length} workflow${r.length!==1?"s":""}`),e.length>0){console.log(`
|
|
50
|
+
Built-in:`);for(let o of e)console.log(` ${o.name} \u2014 ${o.description}`)}if(s.length>0){console.log(`
|
|
51
|
+
Custom:`);for(let o of s)console.log(` ${o.name} \u2014 ${o.description}`)}}return{success:!0,workflows:r}}u(Ce,"workflowList");async function Ie(c,n,r){let e=c.trim();if(!e)return k("Usage: prjct workflow delete <name>",r);try{return O.deleteWorkflow(n,e)?(await J.deleteWorkflowTemplate(e),r.md?console.log(h(S("Workflow Deleted",`Deleted workflow: ${e}`))):v(`deleted workflow: ${e}`),{success:!0}):k(`Workflow '${e}' not found`,r)}catch(s){return k(T(s),r)}}u(Ie,"workflowDelete");var Ee=class extends pe{static{u(this,"WorkflowCommands")}async now(n=null,r=process.cwd(),e={}){try{let s=await D(r);if(!s.ok)return s.result;let t=s.value;if(e.extend){let w=await oe.acknowledgeTurnLimit(t,new Date().toISOString()),j=w?"Turn budget extended for the active cycle \u2014 the hard stop is lifted. Keep it honest: finish it, then `prjct status done`.":'No active cycle to extend. Start one with `prjct work "<intent>"`.';return e.md?console.log(`> ${j}`):m.done(j),{success:w,error:w?void 0:"no active cycle"}}if(!n)return this._showActiveTask(t,r,e);let o=e.geometry?.toLowerCase(),d=o==="direct"||o==="single"||o==="split"?o:void 0,i=await fe(t,r,n,{skipHooks:e.skipHooks,spec:e.spec,geometry:d});if(!i.ok)return{success:!1,error:i.blocked??"Task start blocked"};let a=i.description??n,l=i.taskId??"",f=i.linearId,p=i.branch??"",L=i.instructions??[],C=i.pipeline,R=i.harness,A=i.orchestration,_=(i.relatedContext??[]).slice(0,4),I=_.map(me),W=i.likelyFiles??[],N=W.map(ce),U=(i.risks??[]).map(ue),{buildAlignmentBrief:Pe}=await import("./project-alignment-ADKW3ZWQ.mjs"),Me=_.filter(w=>w.type==="pattern"||w.pattern),Le=_.filter(w=>w.type==="anti-pattern"||w.antiPattern),{stylePatterns:Ne,styleAntis:_e}=await(async()=>{try{let{getActiveProjectStyle:w}=await import("./project-style-evolution-HIMSJQQB.mjs"),j=w(t);return j?{stylePatterns:[...j.payload.patterns.map(E=>({title:E.name,content:E.description})),...j.payload.conventions.map(E=>({title:E.category??"convention",content:E.rule}))],styleAntis:j.payload.antiPatterns.map(E=>({title:E.issue,content:E.suggestion}))}:{stylePatterns:[],styleAntis:[]}}catch{return{stylePatterns:[],styleAntis:[]}}})(),Z=Pe({patterns:[...Ne,...Me.map(w=>({title:w.title,content:w.pattern||w.detail}))],antiPatterns:[..._e,...Le.map(w=>({title:w.title,content:w.antiPattern||w.detail}))],neighborHint:W[0]?.path??null}),x=i.isolation;if(e.md){let w=h(K({description:a,status:"active"}),x?g("\u26A0 Isolated to worktree (foreign occupant)",b([x.reason,`Was: ${x.occupantSummary}`,`Worktree: \`${x.worktreePath}\``,`Branch: \`${x.branch}\``,`**Next:** \`cd ${x.worktreePath}\` and continue there`])):null,g("State",b([`Work cycle: \`${l}\``,p?`Branch: \`${p}\``:null,i.ownerAgent?`Owner: \`${i.ownerAgent}/${i.ownerIdentity??"?"}\``:null,f?`Linear: \`${f}\``:null,R?`Harness: ${R.level} ${R.kind}/${R.risk}`:null,R?.expectedEvidence.length?`Evidence: ${R.expectedEvidence.join(", ")}`:null,L.length>0?`Agent instructions: ${L.length}`:null].filter(j=>j!==null))),A?g("How to run this (orchestration)",[A.directive,A.cast&&A.cast.length>0?`
|
|
52
|
+
**Subagents:** ${A.cast.map(j=>`${j.name} (${j.role})`).join(" \xB7 ")}`:""].filter(Boolean).join("")):null,C?g("Task Pipeline",["> AUTHORITATIVE: this station state is computed from persisted pipeline data \u2014 follow `Next action` over your own phase inference.",b([`Classification: \`${C.classification}\``,`Station: \`${C.station}\``,`Requires spec: ${C.requiresSpec?"yes":"no"}`,`Tests first: ${C.requiresTestsFirst?"yes":"no"}`,`Next action: ${C.nextAction}`])].join(`
|
|
53
|
+
`)):null,L.length>0?g("Agent Instructions",b(L)):null,U.length>0?g("\u26A0 Risk \u2014 what bit us in this area before (read before you edit)",b(U)):null,g("Project alignment",Z.md),I.length>0?g("Living knowledge \u2014 SoT \xB7 tips (terminal \u2192 user)",["> **You are the tip channel** (no separate UI). On your next reply to the user, surface relevant lines as short terminal tips, then act.","> **SoT** = binding project truth \u2014 do not contradict without `prjct remember` superseding.","> **SUGGEST / tip** = propose the live modification in chat (files + action) and apply when editing.",b(I)].join(`
|
|
54
|
+
`)):null,N.length>0?g("Work scope \u2014 prjct (MUST before Grep/Glob)",["> Do NOT tree-walk. Open these first. Expand with `prjct guard <file>` or MCP `prjct_relevant_files` / `prjct_impact_analysis`. Memory+index+graph already ran.",b(N)].join(`
|
|
55
|
+
`)):g("Work scope \u2014 prjct","> No high-confidence files yet. MUST run `prjct context memory <topic>` + `prjct search` (and `prjct sync` if indexes cold) before Grep/Glob walks."),y([{label:"Synthesize context on close",command:'prjct remember context "..."'},{label:"Ship when done",command:"prjct ship --md"}]));console.log(we(w,2e3))}else{if(m.done(`Work: ${a}`),x&&(m.warn(x.reason),m.info(`Isolated \u2192 ${x.worktreePath} (${x.branch})`),m.info(`Next: cd ${x.worktreePath}`)),i.ownerAgent&&m.info(`Owner: ${i.ownerAgent}/${i.ownerIdentity??"?"}`),R&&(m.info(`Harness: ${R.level} ${R.kind}/${R.risk}`),R.expectedEvidence.length>0&&m.info(`Evidence: ${R.expectedEvidence.join(", ")}`)),A&&m.info(A.directive),m.info(Z.line),U.length>0){m.info("\u26A0 Risk \u2014 what bit us in this area before (read before you edit)");for(let w of U)m.info(` ${w}`)}if(I.length>0){m.info("Living knowledge \u2014 surface as terminal tips to the user (SoT binding \xB7 SUGGEST live mods)");for(let w of I)m.info(` ${w}`)}if(N.length>0){m.info("Work scope \u2014 prjct (MUST before Grep/Glob)");for(let w of N)m.info(` ${w}`)}else m.info("Work scope empty \u2014 run prjct context memory / search (or prjct sync) before Grep/Glob");ae("working"),le("task")}return{success:!0,task:a,taskId:l,harness:R}}catch(s){let t=T(s);return e.md?console.log(`> ${t}`):m.fail(t),{success:!1,error:t}}}async _showActiveTask(n,r,e){let s=await de(n,r),t=s.current,o=s.all.filter(i=>!i.isCurrent),d=await(async()=>{try{let{execFileAsync:i}=await import("./exec-34V6SJYO.mjs"),l=(await i("git",["status","--porcelain"],{cwd:r,timeout:2e3})).stdout.split(`
|
|
56
|
+
`).filter(Boolean).length,{renderDelegationTrigger:f}=await import("./task-orchestration-GS4J4KGS.mjs");return f(l)}catch{return null}})();if(!t){let i='no active work cycle. `prjct work "<intent>"` to start one.',a=o.length>0?`
|
|
57
|
+
${o.length} active in other workspace(s):
|
|
58
|
+
${o.map(f=>` ${f.label} ${f.description}`).join(`
|
|
59
|
+
`)}`:"",l=i+a;return e.md?console.log(`> ${l}`):m.info(l),{success:!0,message:"no active work cycle"}}if(e.md)console.log(h(K({description:t.description,status:"active"}),g("State",b([`Work cycle: \`${t.id}\``,`Workspace: \`${t.label}\``,t.branch?`Branch: \`${t.branch}\``:null,t.linearId?`Linear: \`${t.linearId}\``:null,`Started: ${t.startedAt}`,t.pipeline?`Pipeline: \`${t.pipeline.station}\``:null,t.harness?`Harness: ${t.harness.level} ${t.harness.kind}/${t.harness.risk}`:null,d,o.length>0?`Other active workspaces: ${o.length}`:null].filter(i=>i!==null))),t.pipeline?g("Next Action",b([t.pipeline.requiresTestsFirst?"Write tests before implementation for substantive work.":"Proceed directly for this trivial work."])):null,o.length>0?g("Other Active Workspaces",b(o.map(i=>`${i.label} \u2014 ${i.description}`))):null));else{m.info(`Active: ${t.description}`),m.info(`Workspace: ${t.label}`),t.pipeline&&m.info(`Pipeline: ${t.pipeline.station}`),t.harness&&m.info(`Harness: ${t.harness.level} ${t.harness.kind}/${t.harness.risk}`);for(let i of o)m.info(` other: ${i.label} \u2014 ${i.description}`)}return{success:!0,currentTask:t}}async workflow(n=null,r=process.cwd(),e={}){try{let s=await D(r,e);if(!s.ok)return s.result;let t=s.value,o=n?.trim()??"";if(!o)return B(null,t,e);if(o.toLowerCase()==="runs")return this.runs(t,e);let d=ge(o);switch(d.type){case"add":return ye(d.args,t,e);case"gate":return Re(d.args,t,e);case"instruction":return Se(d.args,t,e);case"remove":return ve(d.args,t,e);case"disable":return xe(d.args,t,e);case"reset":return je(t,e);case"init":return We(t,r,e);case"help":return Ae(e);case"create":return Oe(d.args,t,r,e);case"list":return Ce(t,e);case"delete":return Ie(d.args,t,e);case"run":return this.run(d.args,r,e);case"view":return B(d.args||null,t,e);default:return B(o.split(/\s+/)[0]?.toLowerCase()||null,t,e)}}catch(s){return e.md?console.log(`> Error: ${T(s)}`):m.fail(T(s)),re(s)}}async runs(n,r){let{getRecentWorkflowRuns:e}=await import("./run-recorder-EZQ32M55.mjs"),s=e(n,20);if(s.length===0){let o="No workflow runs recorded yet.";return r.md?console.log(`> ${o}`):m.info(o),{success:!0}}let t=s.map(o=>`- \`${o.command}\` \u2014 ${o.status} \xB7 ${o.steps} step(s) \xB7 gates ${o.gatesPassed}\u2713/${o.gatesFailed}\u2717`);return r.md?console.log(["## Workflow runs",...t].join(`
|
|
60
|
+
`)):m.info(["Workflow runs:",...t].join(`
|
|
61
|
+
`)),{success:!0}}async run(n,r=process.cwd(),e={}){try{let s=await D(r,e);if(!s.ok)return s.result;let t=s.value,o=n.trim();if(!o){let a="Usage: prjct workflow run <name>";return e.md?console.log(`> ${a}`):m.warn(a),{success:!1,error:a}}let d=O.getWorkflow(t,o);if(!d||!d.enabled){let a=`Workflow '${o}' not found`;return e.md?console.log(`> ${a}`):m.warn(a),{success:!1,error:a}}let i=await z(t,o,"before",{projectPath:r});if(!i.success){if(e.md)ie("failed","workflow_gates_failed",[{label:"View rules",command:`prjct workflow ${o} --md`}]);else if(m.fail("Workflow gates failed"),i.gatesFailed)for(let a of i.gatesFailed)console.log(` \u2717 ${a}`);return{success:!1,error:"Workflow gates failed",gatesFailed:i.gatesFailed}}return await z(t,o,"after",{projectPath:r}),e.md?console.log(h(S(`Workflow: ${o}`,d.description||""),y([{label:"View rules",command:`prjct workflow ${o} --md`},{label:"Run again",command:`p. ${o}`}]))):m.done(`${o} completed successfully`),{success:!0,workflow:o}}catch(s){let t=T(s);return e.md?console.log(`> Error: ${t}`):m.fail(t),{success:!1,error:t}}}};export{Ee as WorkflowCommands};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as s}from"./chunk-5DZ2LTII.mjs";import"./chunk-6U3CYLY5.mjs";import{f as o,g as e}from"./chunk-4T7NGLNQ.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-ID2C2S33.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DZVOFEM5.mjs";import"./chunk-5EF5EOCL.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as t}from"./chunk-3TRXQAU4.mjs";e();var r=class extends s{static{t(this,"WorkflowsReferenceCommands")}async workflows(n=null,p=process.cwd(),i={}){return console.log(o()),{success:!0}}};export{r as WorkflowsReferenceCommands};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as g}from"./chunk-GTG67Z45.mjs";import{c as u,d}from"./chunk-H2KNJUPN.mjs";import{c as w,e as k}from"./chunk-ESB4ALH2.mjs";import"./chunk-SO3ZPNWT.mjs";import{b as i}from"./chunk-EHVU2SMR.mjs";import"./chunk-HPCSSJXH.mjs";import"./chunk-E5QQDYBR.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as s}from"./chunk-3TRXQAU4.mjs";function b(e,o){return{taskId:e.id,description:e.description,ownerAgent:e.ownerAgent,ownerIdentity:e.ownerIdentity,startedAt:e.startedAt,workspaceId:o,branch:e.branch}}s(b,"asOwner");async function W(e,o,c){let t=c??w(o),r=await d(o),f=await g(e,o),p=r.isMain?await i.getCurrentTask(e):await i.getCurrentTaskForWorkspace(e,r.workspaceId),a=p?b(p,r.isMain?u:r.workspaceId):null,y=f.all.filter(n=>!n.isCurrent).map(n=>({taskId:n.id,description:n.description,startedAt:n.startedAt,workspaceId:n.workspaceId,branch:n.branch})),l=a!==null,I=l&&k(a,t);return{workspaceId:r.workspaceId,isMain:r.isMain,current:a,others:y,occupied:l,occupiedByMe:I}}s(W,"getOccupancy");function M(e,o,c){if(o==="off")return{isolate:!1,reason:"autoWorktree off"};if(!e.occupied||e.occupiedByMe)return{isolate:!1,reason:"workspace free or owned by caller"};let t=e.current,r=[t.ownerAgent,t.ownerIdentity].filter(Boolean).join("/")||"another agent";return e.isMain?o==="ask"?{isolate:!1,block:!0,occupant:t,reason:`Workspace owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Re-run with isolation (config multiAgent.autoWorktree=auto) or \`prjct switch <agent>\` to yield that cycle.`}:{isolate:!0,occupant:t,reason:`Branch/workspace owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Isolating to a sibling worktree.`}:{isolate:!1,block:!0,occupant:t,reason:`Workspace already owned by ${r} on "${t.description}" (${t.taskId.slice(0,8)}). Work elsewhere or \`prjct switch\` to take over.`}}s(M,"shouldIsolate");function $(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40)||`work-${Date.now().toString(36)}`}s($,"worktreeSlugFromIntent");export{W as getOccupancy,M as shouldIsolate,$ as worktreeSlugFromIntent};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a as s,p as b}from"./chunk-D62TAZG6.mjs";import{l as g,p as v}from"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import{a as d}from"./chunk-3TRXQAU4.mjs";b();v();import l from"node:fs/promises";import n from"node:path";var k=".worktrees",f=class{static{d(this,"WorktreeService")}async create(t,e,r={}){let i=await this.getMainWorktree(t),a=n.join(i,k,e),h=r.branch||`feat/${e}`;await l.mkdir(n.join(i,k),{recursive:!0});let c=r.baseBranch?` ${r.baseBranch}`:"";await s(`git worktree add "${a}" -b "${h}"${c}`,{cwd:i});let{stdout:w}=await s("git rev-parse HEAD",{cwd:a});return{path:a,branch:h,commit:w.trim(),isMain:!1,slug:e}}async remove(t,e=!1){let r=await this.getMainWorktree(t),i=e?await s("git rev-parse --abbrev-ref HEAD",{cwd:t}).then(({stdout:a})=>a.trim()).catch(()=>{}):void 0;if(await s(`git worktree remove "${t}" --force`,{cwd:r}),e&&i&&i!=="main"&&i!=="master")try{await s(`git branch -D "${i}"`,{cwd:r})}catch{}}async list(t){let e=await this.getMainWorktree(t),{stdout:r}=await s("git worktree list --porcelain",{cwd:e});return this.parsePorcelainOutput(r,e)}async detect(t){try{let{stdout:e}=await s("git rev-parse --git-common-dir",{cwd:t}),{stdout:r}=await s("git rev-parse --git-dir",{cwd:t}),i=n.resolve(t,e.trim()),a=n.resolve(t,r.trim());if(i!==a){let{stdout:h}=await s("git rev-parse --abbrev-ref HEAD",{cwd:t}),{stdout:c}=await s("git rev-parse HEAD",{cwd:t}),{stdout:w}=await s("git rev-parse --show-toplevel",{cwd:t}),p=w.trim(),u=n.basename(p);return{path:p,branch:h.trim(),commit:c.trim(),isMain:!1,slug:u}}return null}catch{return null}}async getMainWorktree(t){try{let{stdout:r}=await s("git worktree list --porcelain",{cwd:t}),i=r.split(`
|
|
8
|
+
`)[0];if(i?.startsWith("worktree "))return i.replace("worktree ","").trim()}catch{}let{stdout:e}=await s("git rev-parse --show-toplevel",{cwd:t});return e.trim()}async setup(t,e){let r=n.join(e,".env");await g(r)&&await l.copyFile(r,n.join(t,".env"));let i=n.join(e,".prjct"),a=n.join(t,".prjct");await g(i)&&!await g(a)&&await l.symlink(i,a,"dir")}async teardown(t){}async clean(t){let e=await this.list(t),r=[],i=await this.getMainWorktree(t);await s("git worktree prune",{cwd:i});for(let a of e)a.isMain||await g(a.path)||r.push(a.slug);return r}parsePorcelainOutput(t,e){let r=[],i=t.trim().split(`
|
|
9
|
+
|
|
10
|
+
`);for(let a of i){if(!a.trim())continue;let h=a.trim().split(`
|
|
11
|
+
`),{wtPath:c,commit:w,branch:p,isBare:u}=h.reduce((o,m)=>(m.startsWith("worktree ")?o.wtPath=m.replace("worktree ","").trim():m.startsWith("HEAD ")?o.commit=m.replace("HEAD ","").trim():m.startsWith("branch ")?o.branch=m.replace("branch refs/heads/","").trim():m==="bare"?o.isBare=!0:m==="detached"&&(o.branch="(detached)"),o),{wtPath:"",commit:"",branch:"",isBare:!1});if(c){let o=c===e||u;r.push({path:c,branch:p,commit:w,isMain:o,slug:o?"main":n.basename(c)})}}return r}},M=new f;export{M as worktreeService};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'url';
|
|
3
|
+
import { dirname as __pathDirname } from 'path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __pathDirname(__filename);
|
|
7
|
+
import{a,b}from"./chunk-LZILSE5H.mjs";import"./chunk-6OYLZ4NM.mjs";import"./chunk-YEALP3WX.mjs";import"./chunk-CWLGRKA7.mjs";import"./chunk-B2HY22OD.mjs";import"./chunk-XLFEWZRA.mjs";import"./chunk-X433BB6F.mjs";import"./chunk-EZRNQXCC.mjs";import"./chunk-HCPQZRR3.mjs";import"./chunk-B7AQHL7B.mjs";import"./chunk-L4TUXFCL.mjs";import"./chunk-XSZOHNL4.mjs";import"./chunk-OIE3AKKO.mjs";import"./chunk-Q6C27OL7.mjs";import"./chunk-NXUIMC22.mjs";import"./chunk-DMO3ZFUG.mjs";import"./chunk-NNOX3UU4.mjs";import"./chunk-INJ5WT2D.mjs";import"./chunk-HU5ERAAV.mjs";import"./chunk-6RT2P22O.mjs";import"./chunk-ZXTJLMVZ.mjs";import"./chunk-VWFVSNQT.mjs";import"./chunk-U24YKPYX.mjs";import"./chunk-D62TAZG6.mjs";import"./chunk-KPR5TWSN.mjs";import"./chunk-623SNKDH.mjs";import"./chunk-XWLTEAGN.mjs";import"./chunk-DOJPSIMG.mjs";import"./chunk-HYIT7MF5.mjs";import"./chunk-225DWS4D.mjs";import"./chunk-3TRXQAU4.mjs";export{a as breakImpact,b as formatImpactMd};
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as E,b as I}from"./chunk-OWOPA2O7.mjs";import{a as P}from"./chunk-
|
|
8
|
+
import{a as E,b as I}from"./chunk-OWOPA2O7.mjs";import{a as P}from"./chunk-5ALQBNIZ.mjs";import{a as O}from"./chunk-5WAONIPX.mjs";import{a as C}from"./chunk-5TBQNW2G.mjs";import"./chunk-HGZQWYBL.mjs";import{b as N,c as H,d as L}from"./chunk-H5AVBDCH.mjs";import{h as _}from"./chunk-G4VJKPG7.mjs";import"./chunk-T2KVL6PZ.mjs";import"./chunk-PPWPUEBH.mjs";import"./chunk-H4CA3XZ6.mjs";import"./chunk-UK24P7PV.mjs";import{c as D,d as A}from"./chunk-XSJ7SPVR.mjs";import"./chunk-Y7MZA2G4.mjs";import"./chunk-TPESWBA7.mjs";import"./chunk-FEFP6JOL.mjs";import"./chunk-T7DRHVK3.mjs";import"./chunk-NCLONKOT.mjs";import"./chunk-22GFTUER.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-BKJHD5JI.mjs";import"./chunk-CPR4FPXG.mjs";import"./chunk-3HGQPUKG.mjs";import"./chunk-ZJW27EUC.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-SJ75V4WG.mjs";import"./chunk-3CKNJ5RA.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-6EHYPQ5U.mjs";import"./chunk-GAJOSSB4.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-ZPAY2NSF.mjs";import"./chunk-A3R47SP6.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-3FBCOCPD.mjs";import{b as y}from"./chunk-6NMHVPAI.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import{a as x}from"./chunk-RLKYEL3F.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-GAOQHD5S.mjs";import{b as h}from"./chunk-FTBBQHI4.mjs";import"./chunk-3FEXJUO2.mjs";import{d as f,g as v}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import{b as m,h as V,l as S,n as Y,o as R,u as q}from"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-OALZUWC6.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import{a}from"./chunk-E66B27AL.mjs";q();import{spawn as X}from"node:child_process";v();V();v();function G(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}a(G,"parseEvidence");function $(t){return{id:t.id,projectId:t.project_id,taskId:t.task_id,taskDescription:t.task_description,fromAgent:t.from_agent,fromIdentity:t.from_identity,toAgent:t.to_agent,reason:t.reason,evidence:G(t.evidence),status:t.status,workspaceId:t.workspace_id,worktreePath:t.worktree_path,branch:t.branch,createdAt:t.created_at,acceptedAt:t.accepted_at,acceptedBy:t.accepted_by,expiresAt:t.expires_at}}a($,"toHandoff");function M(t){let e=new Date;return e.setTime(e.getTime()+Math.max(1,t)*36e5),e.toISOString()}a(M,"expiresAtIso");function W(t){let e=`hand_${x()}`,o=m(),n=t.ttlHours??24,r=t.evidence?JSON.stringify(t.evidence):null;return f.run(t.projectId,`INSERT INTO task_handoffs (
|
|
9
9
|
id, project_id, task_id, task_description, from_agent, from_identity,
|
|
10
10
|
to_agent, reason, evidence, status, workspace_id, worktree_path, branch,
|
|
11
11
|
created_at, accepted_at, accepted_by, expires_at
|
|
@@ -5,10 +5,10 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as G,b as Se,c as b,d as U,e as q,f as H,g as ve,h as $e,i as v}from"./chunk-
|
|
8
|
+
import{a as G,b as Se,c as b,d as U,e as q,f as H,g as ve,h as $e,i as v}from"./chunk-H3GIYI4Q.mjs";import"./chunk-QOQZHR3E.mjs";import"./chunk-TXJT3G53.mjs";import"./chunk-UWHVPO6X.mjs";import"./chunk-YATXTHDL.mjs";import"./chunk-MIJZT4ZR.mjs";import"./chunk-V6GGH6H5.mjs";import"./chunk-G4VJKPG7.mjs";import"./chunk-T2KVL6PZ.mjs";import"./chunk-PPWPUEBH.mjs";import{a as y,b as R,c as M,d as we,e as E,f as L,g as z}from"./chunk-FSFURDAE.mjs";import{b as ge,c as A,d as ke}from"./chunk-3JOZN7YJ.mjs";import"./chunk-H4CA3XZ6.mjs";import{a as d}from"./chunk-UK24P7PV.mjs";import"./chunk-XSJ7SPVR.mjs";import"./chunk-Y7MZA2G4.mjs";import"./chunk-TPESWBA7.mjs";import"./chunk-FEFP6JOL.mjs";import"./chunk-T7DRHVK3.mjs";import"./chunk-NCLONKOT.mjs";import"./chunk-22GFTUER.mjs";import"./chunk-YQ55MHKL.mjs";import"./chunk-QSAA6LZF.mjs";import"./chunk-KOGZCFBC.mjs";import"./chunk-22CBVTZ3.mjs";import"./chunk-LNB2GLYI.mjs";import{a as ue}from"./chunk-DYHYDHCW.mjs";import"./chunk-BKJHD5JI.mjs";import{a as D,b as ye,c as K}from"./chunk-7H5UVM6X.mjs";import"./chunk-JR542RI2.mjs";import"./chunk-CPR4FPXG.mjs";import"./chunk-3HGQPUKG.mjs";import"./chunk-QMNZPNVY.mjs";import"./chunk-RGOTJCZU.mjs";import"./chunk-KEJ5RMAI.mjs";import"./chunk-ZJW27EUC.mjs";import"./chunk-NGB6JNSB.mjs";import"./chunk-R4YDE3GU.mjs";import"./chunk-ZMLA5SKR.mjs";import"./chunk-SJ75V4WG.mjs";import{e as pe}from"./chunk-3CKNJ5RA.mjs";import"./chunk-R4ILCXKE.mjs";import{d as fe}from"./chunk-6EHYPQ5U.mjs";import"./chunk-GAJOSSB4.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import{b as he}from"./chunk-ZPAY2NSF.mjs";import{a as de}from"./chunk-A3R47SP6.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-3FBCOCPD.mjs";import{b as me}from"./chunk-6NMHVPAI.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-RLKYEL3F.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-XS45K7ZQ.mjs";import"./chunk-GVNMXVVA.mjs";import"./chunk-4KVPAHFV.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-FTBBQHI4.mjs";import"./chunk-3FEXJUO2.mjs";import{d as _,g as ce}from"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import{d as le}from"./chunk-TWFLW6OJ.mjs";import{b as I,g as oe,h as X,v as ie,w as We}from"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import{k as ae,o as Qe}from"./chunk-UH4MD3F3.mjs";import{a as N,b as ne,p as re}from"./chunk-QWQFF2UG.mjs";import"./chunk-XC2BSGWF.mjs";import"./chunk-SYHDEUVU.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-OALZUWC6.mjs";import"./chunk-PKDYFXMI.mjs";import{a as $,e as k,f as J}from"./chunk-BUDZL4DW.mjs";import{a as m}from"./chunk-E66B27AL.mjs";J();re();Qe();import j from"node:fs/promises";import C from"node:path";var Y=class{static{m(this,"CodebaseAnalyzer")}projectPath=null;init(e=process.cwd()){this.projectPath=e}async readPackageJson(){try{let e=C.join(this.projectPath,"package.json"),t=await j.readFile(e,"utf-8");return JSON.parse(t)}catch(e){if($(e)||e instanceof SyntaxError)return null;throw e}}async readCargoToml(){try{let e=C.join(this.projectPath,"Cargo.toml");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readRequirements(){try{let e=C.join(this.projectPath,"requirements.txt");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readGoMod(){try{let e=C.join(this.projectPath,"go.mod");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readGemfile(){try{let e=C.join(this.projectPath,"Gemfile");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readMixExs(){try{let e=C.join(this.projectPath,"mix.exs");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readPomXml(){try{let e=C.join(this.projectPath,"pom.xml");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async readComposerJson(){try{let e=C.join(this.projectPath,"composer.json"),t=await j.readFile(e,"utf-8");return JSON.parse(t)}catch(e){if($(e)||e instanceof SyntaxError)return null;throw e}}async readPyprojectToml(){try{let e=C.join(this.projectPath,"pyproject.toml");return await j.readFile(e,"utf-8")}catch(e){if($(e))return null;throw e}}async getFileExtensions(){try{let{stdout:e}=await N('find . -type f ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" ! -path "*/.next/*" | sed "s/.*\\./\\./" | sort | uniq -c | sort -rn',{cwd:this.projectPath}),t={};return e.trim().split(`
|
|
9
9
|
`).filter(Boolean).forEach(o=>{let s=o.trim().match(/^\s*(\d+)\s+(\.\w+)$/);s&&(t[s[2]]=parseInt(s[1],10))}),t}catch{return{}}}async listConfigFiles(){try{let e=await j.readdir(this.projectPath),t=[/^package\.json$/,/^Cargo\.toml$/,/^go\.mod$/,/^requirements\.txt$/,/^Gemfile$/,/^mix\.exs$/,/^pom\.xml$/,/^composer\.json$/,/^pyproject\.toml$/,/^tsconfig.*\.json$/,/^\..*rc(\.json|\.js|\.cjs)?$/,/^Dockerfile$/,/^docker-compose.*\.ya?ml$/,/^\.env.*$/];return e.filter(o=>t.some(s=>s.test(o)))}catch(e){if($(e))return[];throw e}}async listDirectories(){try{return(await j.readdir(this.projectPath,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).filter(t=>!t.startsWith(".")&&t!=="node_modules")}catch(e){if($(e))return[];throw e}}async getGitLog(e=50){try{let{stdout:t}=await N(`git log -n ${e} --pretty=format:"%h|%an|%ar|%s"`,{cwd:this.projectPath});return t}catch{return""}}async getGitStats(){try{let{stdout:e}=await N("git rev-list --count HEAD",{cwd:this.projectPath}),{stdout:t}=await N('git log --format="%an" | sort -u | wc -l',{cwd:this.projectPath}),{stdout:o}=await N('git log --reverse --pretty=format:"%ar" | head -1',{cwd:this.projectPath});return{totalCommits:parseInt(e.trim(),10)||0,contributors:parseInt(t.trim(),10)||0,age:o.trim()||"unknown"}}catch{return{totalCommits:0,contributors:0,age:"unknown"}}}async countFiles(){try{let{stdout:e}=await N('find . -type f ! -path "*/node_modules/*" ! -path "*/.git/*" ! -path "*/dist/*" | wc -l',{cwd:this.projectPath});return parseInt(e.trim(),10)||0}catch{return 0}}async fileExists(e){return ae(C.join(this.projectPath,e))}async readFile(e){try{let t=C.join(this.projectPath,e);return await j.readFile(t,"utf-8")}catch(t){if($(t))return null;throw t}}async findFiles(e){try{let{stdout:t}=await N(`find . -type f -name "${e}" ! -path "*/node_modules/*" ! -path "*/.git/*"`,{cwd:this.projectPath});return t.trim().split(`
|
|
10
10
|
`).filter(Boolean)}catch{return[]}}},Xe=new Y,S=Xe;We();import je from"node:fs/promises";import Pe from"node:path";var V=800,Z=6,Ke=8,Ye=5;async function ee(r,e,t,o){let[s,i,n,a]=await Promise.all([Ze(r,e,o),et(r),tt(r),st(r)]);return{project:{name:o.name,ecosystem:o.ecosystem,languages:o.languages,frameworks:o.frameworks,fileCount:o.fileCount,projectType:o.projectType},git:{branch:t.branch,recentCommits:t.recentCommits.slice(0,Ke).map(u=>({message:u.message,date:u.date})),hasChanges:t.hasChanges,weeklyCommits:t.weeklyCommits},codeSamples:s,existingPatterns:i,taskHistory:n,previousAnalysis:a??void 0}}m(ee,"buildAnalysisPayload");async function Ze(r,e,t){let o=[],s=[...t.frameworks.map(a=>a.toLowerCase()),"config","router","middleware","service","model","schema","database","api","auth"].join(" "),i=pe(r,s,Z*2);for(let a of i){if(o.length>=Z)break;try{let u=Pe.join(e,a.path),c=await je.readFile(u,"utf-8");c.length>V*3?o.push({path:a.path,content:`${c.slice(0,V)}
|
|
11
|
-
// ... truncated`,reason:`BM25 score: ${a.score.toFixed(2)} (truncated, ${c.length} chars)`}):o.push({path:a.path,content:c.slice(0,V),reason:`BM25 score: ${a.score.toFixed(2)}`})}catch{}}let n=["package.json","tsconfig.json","src/index.ts","src/main.ts","app.ts"];for(let a of n){if(o.length>=Z)break;if(!o.some(u=>u.path===a))try{let u=Pe.join(e,a),c=await je.readFile(u,"utf-8");o.push({path:a,content:c.slice(0,V),reason:"entry point"})}catch{}}return o}m(Ze,"selectCodeSamples");async function et(r){try{let e=await b.getActive(r);return e?{patterns:(e.patterns??[]).map(t=>({name:t.name,description:t.description})),antiPatterns:(e.antiPatterns??[]).map(t=>({issue:t.issue,file:t.file,suggestion:t.suggestion}))}:{patterns:[],antiPatterns:[]}}catch{return{patterns:[],antiPatterns:[]}}}m(et,"getExistingPatterns");async function tt(r){try{return(await me.getTaskHistory(r)).slice(0,Ye).map(t=>({description:t.title,status:t.classification,branch:t.branchName}))}catch{return[]}}m(tt,"getTaskHistory");function st(r){try{let e=D.getActiveSummary(r);return Promise.resolve(e)}catch(e){return ue.debug("Failed to get previous LLM analysis summary",{error:e}),Promise.resolve(null)}}m(st,"getPreviousAnalysisSummary");J();X();ce();J();async function be(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),t.result;let o=t.value,s=await b.seal(o);return e.json?(console.log(JSON.stringify({success:s.success,signature:s.signature,error:s.error})),{success:s.success,error:s.error}):s.success?(d.done("Analysis sealed"),console.log(` Signature: ${s.signature?.substring(0,16)}...`),console.log(""),{success:!0,data:{signature:s.signature}}):(d.fail(s.error||"Seal failed"),{success:!1,error:s.error})}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):d.fail(o),{success:!1,error:o}}}m(be,"seal");async function Ce(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),t.result;let o=t.value,s=await b.rollback(o);return e.json?(console.log(JSON.stringify({success:s.success,restoredSignature:s.restoredSignature,error:s.error})),{success:s.success,error:s.error}):e.md?s.success?(console.log(y(L("Analysis Rolled Back"),E({"Restored signature":`${s.restoredSignature?.substring(0,16)}...`,Note:"Previous sealed version is now active. Current version moved to draft."}))),{success:!0,data:{restoredSignature:s.restoredSignature}}):(console.log(y("## Rollback Failed",`> ${s.error}`)),{success:!1,error:s.error}):s.success?(d.done("Analysis rolled back to previous sealed version"),console.log(` Restored signature: ${s.restoredSignature?.substring(0,16)}...`),console.log(" Previous sealed version demoted to draft"),console.log(""),{success:!0,data:{restoredSignature:s.restoredSignature}}):(d.fail(s.error||"Rollback failed"),{success:!1,error:s.error})}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):e.md?console.log(y("## Rollback Failed",`> ${o}`)):d.fail(o),{success:!1,error:o}}}m(Ce,"rollback");async function xe(r=process.cwd(),e={}){if(e.semantic)return te(r,e);try{let t=await v(r);if(!t.ok)return t.result;let o=t.value,s=await b.verify(o);return e.json?(console.log(JSON.stringify(s)),{success:s.valid}):(s.valid?d.done(s.message):d.fail(s.message),console.log(""),{success:s.valid,data:s})}catch(t){let o=k(t);return ge(o)}}m(xe,"verify");async function te(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):d.fail("No project ID found"),t.result;let o=t.value,s=(()=>{try{return _.getDoc(o,"project")?.repoPath||r}catch{return r}})(),i=await b.semanticVerify(o,s);if(e.json)return console.log(JSON.stringify(i)),{success:i.passed,data:i};console.log(""),i.passed?(d.done("Semantic verification passed"),console.log(` ${i.passedCount}/${i.checks.length} checks passed (${i.totalMs}ms)`)):(d.fail("Semantic verification failed"),console.log(` ${i.failedCount}/${i.checks.length} checks failed`)),console.log(""),console.log("Check Results:");for(let n of i.checks){let a=n.passed?"\u2713":"\u2717",u=n.passed?`${n.output} (${n.durationMs}ms)`:n.error||"Failed";console.log(` ${a} ${n.name}: ${u}`)}return console.log(""),{success:i.passed,data:i}}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):d.fail(o),{success:!1,error:o}}}m(te,"semanticVerifyCommand");import De from"node:fs/promises";import Re from"node:path";import{z as l}from"zod";var nt=l.object({style:l.string(),insights:l.array(l.string()),domains:l.array(l.string())}),rt=l.object({name:l.string(),description:l.string(),locations:l.array(l.string()),confidence:l.number().min(0).max(1),category:l.string()}),ot=l.object({issue:l.string(),reasoning:l.string(),files:l.array(l.string()),suggestion:l.string(),severity:l.enum(["low","medium","high"]),confidence:l.number().min(0).max(1)}),at=l.object({description:l.string(),area:l.string(),effort:l.enum(["small","medium","large"]),impact:l.string(),priority:l.enum(["low","medium","high"])}),it=l.object({path:l.string(),reason:l.string(),risk:l.string(),severity:l.enum(["low","medium","high"])}),ct=l.object({description:l.string(),files:l.array(l.string()),benefit:l.string(),effort:l.enum(["small","medium","large"])}),lt=l.object({category:l.string(),rule:l.string(),example:l.string().optional()}),ut=l.object({build:l.string().optional(),test:l.string().optional(),lint:l.string().optional(),dev:l.string().optional(),format:l.string().optional(),install:l.string().optional()}),mt=l.object({languages:l.array(l.string()),frameworks:l.array(l.string()),packageManager:l.string().optional()}),gt=l.object({version:l.literal(1),commitHash:l.string().nullable(),analyzedAt:l.string(),architecture:nt,patterns:l.array(rt),antiPatterns:l.array(ot),techDebt:l.array(at),riskAreas:l.array(it),refactorSuggestions:l.array(ct),projectInsights:l.array(l.string()),conventions:l.array(lt),commands:ut.optional(),stack:mt.optional()});function Ae(r){let e=gt.safeParse(r);return e.success?{ok:!0,value:e.data}:{ok:!1,error:e.error.issues.map(o=>`${o.path.length>0?o.path.join("."):"<root>"}: ${o.message}`).join("; ")}}m(Ae,"parseLlmAnalysis");X();re();async function Le(r,e=process.cwd(),t={}){try{let o=await v(e);if(!o.ok)return o.result;let s=o.value,i=await pt(r,e),n=await ft(i.content,e),a=D.getActive(s),u=!!(a&&ye(a)&&K(n)),c=u?dt(a,n):n;D.save(s,c);try{let{recomputeProjectStyle:f}=await import("./project-style-evolution-
|
|
11
|
+
// ... truncated`,reason:`BM25 score: ${a.score.toFixed(2)} (truncated, ${c.length} chars)`}):o.push({path:a.path,content:c.slice(0,V),reason:`BM25 score: ${a.score.toFixed(2)}`})}catch{}}let n=["package.json","tsconfig.json","src/index.ts","src/main.ts","app.ts"];for(let a of n){if(o.length>=Z)break;if(!o.some(u=>u.path===a))try{let u=Pe.join(e,a),c=await je.readFile(u,"utf-8");o.push({path:a,content:c.slice(0,V),reason:"entry point"})}catch{}}return o}m(Ze,"selectCodeSamples");async function et(r){try{let e=await b.getActive(r);return e?{patterns:(e.patterns??[]).map(t=>({name:t.name,description:t.description})),antiPatterns:(e.antiPatterns??[]).map(t=>({issue:t.issue,file:t.file,suggestion:t.suggestion}))}:{patterns:[],antiPatterns:[]}}catch{return{patterns:[],antiPatterns:[]}}}m(et,"getExistingPatterns");async function tt(r){try{return(await me.getTaskHistory(r)).slice(0,Ye).map(t=>({description:t.title,status:t.classification,branch:t.branchName}))}catch{return[]}}m(tt,"getTaskHistory");function st(r){try{let e=D.getActiveSummary(r);return Promise.resolve(e)}catch(e){return ue.debug("Failed to get previous LLM analysis summary",{error:e}),Promise.resolve(null)}}m(st,"getPreviousAnalysisSummary");J();X();ce();J();async function be(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),t.result;let o=t.value,s=await b.seal(o);return e.json?(console.log(JSON.stringify({success:s.success,signature:s.signature,error:s.error})),{success:s.success,error:s.error}):s.success?(d.done("Analysis sealed"),console.log(` Signature: ${s.signature?.substring(0,16)}...`),console.log(""),{success:!0,data:{signature:s.signature}}):(d.fail(s.error||"Seal failed"),{success:!1,error:s.error})}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):d.fail(o),{success:!1,error:o}}}m(be,"seal");async function Ce(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json&&console.log(JSON.stringify({success:!1,error:"No project ID found"})),t.result;let o=t.value,s=await b.rollback(o);return e.json?(console.log(JSON.stringify({success:s.success,restoredSignature:s.restoredSignature,error:s.error})),{success:s.success,error:s.error}):e.md?s.success?(console.log(y(L("Analysis Rolled Back"),E({"Restored signature":`${s.restoredSignature?.substring(0,16)}...`,Note:"Previous sealed version is now active. Current version moved to draft."}))),{success:!0,data:{restoredSignature:s.restoredSignature}}):(console.log(y("## Rollback Failed",`> ${s.error}`)),{success:!1,error:s.error}):s.success?(d.done("Analysis rolled back to previous sealed version"),console.log(` Restored signature: ${s.restoredSignature?.substring(0,16)}...`),console.log(" Previous sealed version demoted to draft"),console.log(""),{success:!0,data:{restoredSignature:s.restoredSignature}}):(d.fail(s.error||"Rollback failed"),{success:!1,error:s.error})}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):e.md?console.log(y("## Rollback Failed",`> ${o}`)):d.fail(o),{success:!1,error:o}}}m(Ce,"rollback");async function xe(r=process.cwd(),e={}){if(e.semantic)return te(r,e);try{let t=await v(r);if(!t.ok)return t.result;let o=t.value,s=await b.verify(o);return e.json?(console.log(JSON.stringify(s)),{success:s.valid}):(s.valid?d.done(s.message):d.fail(s.message),console.log(""),{success:s.valid,data:s})}catch(t){let o=k(t);return ge(o)}}m(xe,"verify");async function te(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return e.json?console.log(JSON.stringify({success:!1,error:"No project ID found"})):d.fail("No project ID found"),t.result;let o=t.value,s=(()=>{try{return _.getDoc(o,"project")?.repoPath||r}catch{return r}})(),i=await b.semanticVerify(o,s);if(e.json)return console.log(JSON.stringify(i)),{success:i.passed,data:i};console.log(""),i.passed?(d.done("Semantic verification passed"),console.log(` ${i.passedCount}/${i.checks.length} checks passed (${i.totalMs}ms)`)):(d.fail("Semantic verification failed"),console.log(` ${i.failedCount}/${i.checks.length} checks failed`)),console.log(""),console.log("Check Results:");for(let n of i.checks){let a=n.passed?"\u2713":"\u2717",u=n.passed?`${n.output} (${n.durationMs}ms)`:n.error||"Failed";console.log(` ${a} ${n.name}: ${u}`)}return console.log(""),{success:i.passed,data:i}}catch(t){let o=k(t);return e.json?console.log(JSON.stringify({success:!1,error:o})):d.fail(o),{success:!1,error:o}}}m(te,"semanticVerifyCommand");import De from"node:fs/promises";import Re from"node:path";import{z as l}from"zod";var nt=l.object({style:l.string(),insights:l.array(l.string()),domains:l.array(l.string())}),rt=l.object({name:l.string(),description:l.string(),locations:l.array(l.string()),confidence:l.number().min(0).max(1),category:l.string()}),ot=l.object({issue:l.string(),reasoning:l.string(),files:l.array(l.string()),suggestion:l.string(),severity:l.enum(["low","medium","high"]),confidence:l.number().min(0).max(1)}),at=l.object({description:l.string(),area:l.string(),effort:l.enum(["small","medium","large"]),impact:l.string(),priority:l.enum(["low","medium","high"])}),it=l.object({path:l.string(),reason:l.string(),risk:l.string(),severity:l.enum(["low","medium","high"])}),ct=l.object({description:l.string(),files:l.array(l.string()),benefit:l.string(),effort:l.enum(["small","medium","large"])}),lt=l.object({category:l.string(),rule:l.string(),example:l.string().optional()}),ut=l.object({build:l.string().optional(),test:l.string().optional(),lint:l.string().optional(),dev:l.string().optional(),format:l.string().optional(),install:l.string().optional()}),mt=l.object({languages:l.array(l.string()),frameworks:l.array(l.string()),packageManager:l.string().optional()}),gt=l.object({version:l.literal(1),commitHash:l.string().nullable(),analyzedAt:l.string(),architecture:nt,patterns:l.array(rt),antiPatterns:l.array(ot),techDebt:l.array(at),riskAreas:l.array(it),refactorSuggestions:l.array(ct),projectInsights:l.array(l.string()),conventions:l.array(lt),commands:ut.optional(),stack:mt.optional()});function Ae(r){let e=gt.safeParse(r);return e.success?{ok:!0,value:e.data}:{ok:!1,error:e.error.issues.map(o=>`${o.path.length>0?o.path.join("."):"<root>"}: ${o.message}`).join("; ")}}m(Ae,"parseLlmAnalysis");X();re();async function Le(r,e=process.cwd(),t={}){try{let o=await v(e);if(!o.ok)return o.result;let s=o.value,i=await pt(r,e),n=await ft(i.content,e),a=D.getActive(s),u=!!(a&&ye(a)&&K(n)),c=u?dt(a,n):n;D.save(s,c);try{let{recomputeProjectStyle:f}=await import("./project-style-evolution-2IFJCACQ.mjs"),{gatherStats:h,detectStack:x,detectCommands:B}=await import("./sync-analyzer-6U5GHYV3.mjs"),[T,P,Q]=await Promise.all([h(e),x(e),B(e)]);await f({projectId:s,projectPath:e,stats:T,stack:P,commands:Q,commitHash:c.commitHash,source:"analysis-save"})}catch{}let p=K(c)&&!u;if(t.md){let h=[L(u?"LLM Analysis Notes Merged (house style preserved)":p?"LLM Analysis Notes Saved (thin \u2014 not house style)":"LLM Analysis Saved"),E({Input:i.source,Architecture:c.architecture.style,Patterns:c.patterns.length,"Anti-patterns":c.antiPatterns?.length||0,"Tech debt items":c.techDebt?.length||0,"Risk areas":c.riskAreas?.length||0,Conventions:c.conventions?.length||0,...u?{Merge:"thin notes \u2192 existing rich analysis"}:{},...p?{Kind:"thin markdown/notes"}:{}})];p&&h.push(z("Prefer schema v1 JSON (architecture/patterns/conventions) via `prjct analysis-save-llm <file> --md`. Markdown alone leaves patterns empty and burns a retry loop.")),console.log(y(...h))}else console.log(JSON.stringify({success:!0,message:u?"LLM analysis notes merged into existing rich analysis":p?"LLM analysis thin notes saved (prefer schema v1 JSON for house style)":"LLM analysis saved",input:i.source,mergedNotes:u,thin:p,stats:{patterns:c.patterns.length,antiPatterns:c.antiPatterns?.length||0,techDebt:c.techDebt?.length||0},...p?{tip:"Prefer schema v1 JSON (architecture/patterns/conventions). Markdown alone is thin notes."}:{}}));return{success:!0}}catch(o){return A(o)}}m(Le,"saveLlmAnalysis");function dt(r,e){let t=m((o,s,i)=>{let n=[],a=new Set;for(let u of[...o,...s]){let c=u.toLowerCase();if(!(a.has(c)||!u.trim())&&(a.add(c),n.push(u),n.length>=i))break}return n},"mergeUnique");return{...r,analyzedAt:e.analyzedAt,commitHash:e.commitHash??r.commitHash,projectInsights:t(r.projectInsights??[],e.projectInsights??[],60),architecture:{...r.architecture,insights:t(r.architecture.insights??[],e.architecture.insights??[],24)}}}m(dt,"mergeThinNotesIntoRich");async function pt(r,e){let t=r.trim();if(!t)throw new Error("analysis-save-llm requires analysis text, JSON, or a file path");let o=Re.isAbsolute(t)?t:Re.resolve(e,t);try{if((await De.stat(o)).isFile())return{content:await De.readFile(o,"utf-8"),source:"file"}}catch{}return{content:r,source:"inline"}}m(pt,"resolveAnalysisInput");async function ft(r,e){let t=r.trim();if(!t)throw new Error("analysis-save-llm received an empty analysis");let o=ht(t);if(o.ok){let s=Ae(o.value);return s.ok?s.value:Me(`Structured analysis did not match the legacy schema; preserved as LLM notes.
|
|
12
12
|
|
|
13
13
|
${JSON.stringify(o.value,null,2)}`,e)}return Me(t,e)}m(ft,"normalizeAnalysis");function ht(r){try{return{ok:!0,value:JSON.parse(r)}}catch{return{ok:!1}}}m(ht,"tryParseJson");async function Me(r,e){let t=yt(r);return{version:1,commitHash:await wt(e),analyzedAt:I(),architecture:{style:"unknown",insights:t.slice(0,8),domains:[]},patterns:[],antiPatterns:[],techDebt:[],riskAreas:[],refactorSuggestions:[],projectInsights:t,conventions:[]}}m(Me,"analysisFromText");function yt(r){let e=r.split(/\r?\n/).map(s=>s.replace(/^\s{0,3}#{1,6}\s+/,"").replace(/^\s*[-*]\s+\[[ xX]\]\s+/,"").replace(/^\s*[-*]\s+/,"").replace(/^\s*\d+[.)]\s+/,"").trim()).filter(St),t=[],o=new Set;for(let s of e){let i=s.toLowerCase();if(!o.has(i)&&(o.add(i),t.push(s),t.length>=40))break}return t.length>0?t:[r.slice(0,2e3)]}m(yt,"textToInsights");function St(r){if(!r||!/[\p{L}\p{N}]/u.test(r))return!1;let e=r.toLowerCase().replace(/\s+/g," ").trim();return!(["current work","wip","misc","todo","n/a","none","latest","unreleased","changelog"].includes(e)||/^[-=_]{3,}$/.test(e)||/^(added|changed|fixed|removed)$/i.test(e)||/^v?\d+\.\d+\.\d+(?:-[\w.-]+)?$/i.test(e))}m(St,"isUsefulInsight");async function wt(r){try{let{stdout:e}=await ne("git",["rev-parse","HEAD"],{cwd:r});return e.trim()||null}catch{return null}}m(wt,"resolveCurrentCommit");async function Ne(r=process.cwd(),e={}){try{let t=await v(r);if(!t.ok)return t.result;let o=t.value,s=D.getActive(o);if(!s)return e.md?console.log(y("## No LLM Analysis","> Run `prjct sync` to generate.")):console.log(JSON.stringify({success:!1,message:"No LLM analysis found"})),{success:!1,message:"No LLM analysis found"};if(e.md){let i=[L(`LLM Analysis (${s.architecture.style})`),""];if(s.architecture.insights.length>0&&i.push(R("Architecture Insights",M(s.architecture.insights.slice(0,5)))),s.patterns.length>0){let n=s.patterns.slice(0,8);i.push(R(`Patterns (${s.patterns.length})`,M(n.map(a=>`**${a.name}** \u2014 ${a.description} (${a.category})`))))}if(s.antiPatterns.length>0){let n=s.antiPatterns.slice(0,5);i.push(R(`Anti-Patterns (${s.antiPatterns.length})`,M(n.map(a=>`[${a.severity}] ${a.issue} \u2014 ${a.suggestion}`))))}if(s.techDebt.length>0){let n=s.techDebt.slice(0,5);i.push(R(`Tech Debt (${s.techDebt.length})`,M(n.map(a=>`[${a.priority}/${a.effort}] ${a.description}`))))}s.conventions.length>0&&i.push(R("Conventions",M(s.conventions.slice(0,5).map(n=>`**${n.category}**: ${n.rule}`)))),console.log(y(...i))}else{let i={...s,patterns:s.patterns.slice(0,10),antiPatterns:s.antiPatterns.slice(0,6),techDebt:s.techDebt.slice(0,6),conventions:s.conventions.slice(0,6)};console.log(JSON.stringify({success:!0,analysis:i}))}return{success:!0,data:s}}catch(t){return A(t)}}m(Ne,"getLlmAnalysis");ce();J();import $t from"node:path";X();async function Te(r,e){let t=Date.now()-e;await le.installGlobalConfig(),d.done(`Synced ${r.stats.name||"project"} (${(t/1e3).toFixed(1)}s)`),console.log("");let o=r.stats.frameworks.length>0?` (${r.stats.frameworks[0]})`:"",s=r.syncMetrics?.indexes,i=[`${r.stats.fileCount} files indexed`,`Stack: ${r.stats.ecosystem}${o} | Branch: ${r.git.branch}`];if(s?.bm25Files){let a=s.bm25Files*(s.bm25AvgTokens||0);i.push(`Index: ${O(a)} tokens | ${s.bm25VocabSize||0} terms | ${s.importEdges||0} imports`)}d.box("Sync Summary",i.join(`
|
|
14
14
|
`));let n=[];if(r.generatedSkills?.generated&&r.generatedSkills.generated.length>0){let a=r.generatedSkills.generated.length,u=a===1?"skill":"skills";n.push(`${a} ${u} generated`)}if(r.context7&&n.push(`Context7: ${r.context7.verified?"verified":`not ready${r.context7.message?` (${r.context7.message})`:""}`}`),r.analysisSummary&&n.push(`Analysis: ${r.analysisSummary.patterns} patterns | ${r.analysisSummary.antiPatterns} anti-patterns (${r.analysisSummary.criticalAntiPatterns} critical)`),r.contextQuality){let a=r.contextQuality,u=a.irrelevantRemoved>0||a.repairEntriesCreated>0?`, repaired ${a.repairEntriesCreated}, removed ${a.irrelevantRemoved}`:"";n.push(`Context quality: ${a.score}/${a.threshold}${a.passed?"":" (needs review)"}${u}`)}if(d.section("Generated"),d.list(n,{bullet:"\u2713"}),console.log(""),r.phaseTimings&&r.phaseTimings.length>0){let a=[...r.phaseTimings].sort((u,c)=>c.ms-u.ms).slice(0,3).map(u=>`${u.phase} ${(u.ms/1e3).toFixed(1)}s`).join(", ");console.log(`Slowest phases: ${a}`),console.log("")}if(r.git.hasChanges&&(d.warn("Uncommitted changes detected"),console.log("")),r.verification){let a=r.verification;if(a.passed){let u=a.checks.map(c=>`${c.name} (${c.durationMs}ms)`);d.section("Verified"),d.list(u,{bullet:"\u2713"})}else{d.section("Verification");let u=a.checks.map(c=>c.passed?`\u2713 ${c.name}`:`\u2717 ${c.name}${c.error?` \u2014 ${c.error}`:""}`);d.list(u),a.skippedCount>0&&d.warn(`${a.skippedCount} check(s) skipped (fail-fast)`)}console.log("")}return ve("sync"),{success:!0,data:r,metrics:{elapsed:t,fileCount:r.stats.fileCount}}}m(Te,"showSyncResult");async function Fe(r){try{let e=await de.getRecentEvents(r,100),t=new Date().toISOString().split("T")[0],o=e.filter(c=>(c.timestamp||c.ts)?.startsWith(t)),s=(()=>{if(o.length<2)return null;let c=o.map(f=>new Date(f.timestamp||f.ts).getTime()).filter(f=>!Number.isNaN(f)).sort((f,h)=>f-h);if(c.length<2)return null;let p=c[c.length-1]-c[0];return oe(p)})(),i=o.filter(c=>c.action==="task_completed").length,n=o.filter(c=>c.action==="feature_shipped").length,a=new Map;for(let c of o)if(c.action==="sync"&&Array.isArray(c.subagents))for(let p of c.subagents)a.set(p,(a.get(p)||0)+1);let u=Array.from(a.entries()).map(([c,p])=>({name:c,count:p})).sort((c,p)=>p.count-c.count);return{sessionDuration:s,tasksCompleted:i,featuresShipped:n,agentsUsed:u}}catch{return{sessionDuration:null,tasksCompleted:0,featuresShipped:0,agentsUsed:[]}}}m(Fe,"getSessionActivity");function O(r){return r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:r.toLocaleString()}m(O,"formatTokens");function se(r){return r<1e3?`${Math.round(r)}ms`:`${(r/1e3).toFixed(1)}s`}m(se,"formatDuration");function Ee(r){if(r.length===0)return"";let e="\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588",t=r.map(s=>s.tokensSaved),o=Math.max(...t,1);return t.map(s=>{let i=Math.min(Math.floor(s/o*(e.length-1)),e.length-1);return e[i]}).join("")}m(Ee,"generateSparkline");function Oe(r,e,t,o,s,i){let n=[];if(n.push(`# ${t} - Stats Dashboard`),n.push(""),n.push(`_Generated: ${new Date().toLocaleString()} | Tracking since: ${o}_`),n.push(""),s){if(n.push("## Today's Activity"),n.push(""),n.push("| Metric | Value |"),n.push("|--------|-------|"),s.sessionDuration&&n.push(`| Duration | ${s.sessionDuration} |`),n.push(`| Tasks completed | ${s.tasksCompleted} |`),n.push(`| Features shipped | ${s.featuresShipped} |`),s.agentsUsed.length>0){let a=s.agentsUsed.slice(0,3).map(u=>`${u.name} (${u.count}\xD7)`).join(", ");n.push(`| Agents used | ${a} |`)}n.push("")}if(i&&(i.decisions>0||i.preferences>0)&&(n.push("## Patterns Learned"),n.push(""),n.push("| Type | Count |"),n.push("|------|-------|"),n.push(`| Decisions | ${i.learnedDecisions} confirmed (${i.decisions} total) |`),n.push(`| Preferences | ${i.preferences} |`),n.push(`| Workflows | ${i.workflows} |`),n.push("")),n.push("## Context Efficiency"),n.push(""),n.push("| Metric | Value |"),n.push("|--------|-------|"),n.push(`| Tokens reduced | ${O(r.totalTokensSaved)} |`),n.push(`| Compression | ${(r.compressionRate*100).toFixed(0)}% |`),n.push(`| Est. cost saved | ${U(r.estimatedCostSaved)} |`),n.push(""),n.push("## Performance"),n.push(""),n.push("| Metric | Value |"),n.push("|--------|-------|"),n.push(`| Syncs | ${r.syncCount} |`),n.push(`| Avg time | ${se(r.avgSyncDuration)} |`),n.push(""),r.topAgents.length>0){n.push("## Agent Usage"),n.push(""),n.push("| Agent | Usage |"),n.push("|-------|-------|");let a=r.topAgents.reduce((u,c)=>u+c.usageCount,0);for(let u of r.topAgents){let c=a>0?(u.usageCount/a*100).toFixed(0):0;n.push(`| ${u.agentName} | ${c}% (${u.usageCount}) |`)}n.push("")}if(n.push("## 30-Day Trend"),n.push(""),n.push(`- Tokens saved: ${O(r.last30DaysTokens)}`),r.trend!==0){let a=r.trend>0?"+":"";n.push(`- Trend: ${a}${r.trend.toFixed(0)}% vs previous period`)}return n.push(""),n.push("---"),n.push(""),n.push("_Generated with [prjct-cli](https://prjct.app)_"),n.join(`
|
|
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as n}from"./chunk-
|
|
8
|
+
import{a as n}from"./chunk-GER6HFWV.mjs";import"./chunk-YATXTHDL.mjs";import"./chunk-MIJZT4ZR.mjs";import"./chunk-V6GGH6H5.mjs";import"./chunk-ZF2EVMY7.mjs";import"./chunk-DYHYDHCW.mjs";import"./chunk-R4ILCXKE.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-OC4CYF7V.mjs";import"./chunk-3FBCOCPD.mjs";import"./chunk-XDBJSJOT.mjs";import"./chunk-6NMHVPAI.mjs";import"./chunk-OUAS3LZ3.mjs";import"./chunk-ETTDRXQ6.mjs";import"./chunk-RLKYEL3F.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-BUDZL4DW.mjs";import{a as t}from"./chunk-E66B27AL.mjs";async function c(u,o){try{let e=o??await import("./config-manager-UPB7NEXF.mjs").then(({default:a})=>a.readConfig(u).catch(()=>null));if(!e?.projectId||!e.cloud?.enabled||e.cloud.paused)return{ran:!1};if(!await n.hasAuth())return{ran:!1};let r=await n.sync(e.projectId,{include:e.cloud.include??{}});return{ran:!0,pushed:r.pushed?.count??0,pulled:r.pulled?.count??0,error:r.success?void 0:r.error}}catch{return{ran:!1}}}t(c,"flushIfLinked");export{c as flushIfLinked};
|
|
@@ -5,4 +5,4 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{i as a}from"./chunk-
|
|
8
|
+
import{i as a}from"./chunk-PZMBZ6GE.mjs";import"./chunk-GAJOSSB4.mjs";import"./chunk-Y5NQV46G.mjs";import"./chunk-DXQMKW2B.mjs";import"./chunk-QIB6Y6AH.mjs";import"./chunk-ZPAY2NSF.mjs";import"./chunk-A3R47SP6.mjs";import"./chunk-UUULLTQV.mjs";import"./chunk-RLKYEL3F.mjs";import"./chunk-7WO5CEH3.mjs";import"./chunk-AORD3YDQ.mjs";import"./chunk-M5E2YOZ4.mjs";import"./chunk-GAOQHD5S.mjs";import"./chunk-FTBBQHI4.mjs";import"./chunk-3FEXJUO2.mjs";import"./chunk-TKXOMN4K.mjs";import"./chunk-CE4RCNC7.mjs";import"./chunk-A6K4H3YT.mjs";import"./chunk-HDSS6UB3.mjs";import"./chunk-JQE2F2RK.mjs";import"./chunk-WUHGODSQ.mjs";import"./chunk-UH4MD3F3.mjs";import"./chunk-QWQFF2UG.mjs";import"./chunk-GCKILEXJ.mjs";import"./chunk-OALZUWC6.mjs";import"./chunk-PKDYFXMI.mjs";import"./chunk-BUDZL4DW.mjs";import"./chunk-E66B27AL.mjs";export{a as captureGate};
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as l}from"./chunk-DYHYDHCW.mjs";import{a as x}from"./chunk-M5E2YOZ4.mjs";import{r as g,u as j}from"./chunk-A6K4H3YT.mjs";import{k as d,o as H}from"./chunk-UH4MD3F3.mjs";import{c as h}from"./chunk-
|
|
8
|
+
import{a as l}from"./chunk-DYHYDHCW.mjs";import{a as x}from"./chunk-M5E2YOZ4.mjs";import{r as g,u as j}from"./chunk-A6K4H3YT.mjs";import{k as d,o as H}from"./chunk-UH4MD3F3.mjs";import{c as h}from"./chunk-XC2BSGWF.mjs";import{b as m,e as E}from"./chunk-OALZUWC6.mjs";import{e as c,f as p}from"./chunk-BUDZL4DW.mjs";import{a as i}from"./chunk-E66B27AL.mjs";import w from"node:fs/promises";import P from"node:os";import y from"node:path";p();H();E();j();p();import C from"node:fs/promises";async function k(e){let{skillMdPath:t,skillExists:r,templateContent:a,build:s,logLabel:o}=e;try{let n=s(a);return r&&await C.readFile(t,"utf-8").catch(()=>"")===n.content?{success:!0,action:"unchanged",path:t}:(await C.writeFile(t,n.content,"utf-8"),{success:!0,action:r?"updated":"created",path:t})}catch(n){return l.warn(`${o} skill warning: ${c(n)}`),{success:!1,action:null}}}i(k,"writeSkillIfChanged");var L="prjct-codex-router",S=1024;function b(){return y.join(P.homedir(),".codex","skills","prjct","SKILL.md")}i(b,"getCodexSkillPath");function K(e){return`<!-- ${L}: ${JSON.stringify({v:m,h:e})} -->`}i(K,"getCodexSkillMetadata");function M(e){let t=e.match(new RegExp(`<!--\\s*${L}:\\s*(\\{[\\s\\S]*?\\})\\s*-->`));if(!t)return null;try{let r=JSON.parse(t[1]);return{version:r.v??r.version,templateHash:r.h??r.templateHash}}catch{return null}}i(M,"parseCodexSkillMetadata");function $(e){return x(e).slice(0,12)}i($,"hashContent");async function I(){return h("codex/SKILL.md")}i(I,"loadCodexSkillTemplate");function R(e){let t=e.trimEnd(),r=$(t),a=K(r);return{content:`${t}
|
|
9
9
|
|
|
10
10
|
${a}
|
|
11
11
|
`,templateHash:r}}i(R,"buildCodexSkillContent");async function D(){try{let e=b(),t=y.dirname(e);await w.mkdir(t,{recursive:!0});let r=await d(e),a=await I();return a?await k({skillMdPath:e,skillExists:r,templateContent:a,build:i(s=>{let o=R(s),n=Buffer.byteLength(o.content,"utf-8");return n>S&&l.warn(`Codex SKILL.md is ${n} bytes \u2014 over Codex's ~${S}-byte hard limit; the skill may be rejected. Trim editor-surfaces.ts.`),o},"build"),logLabel:"Codex"}):(l.warn("Codex SKILL.md template not found"),{success:!1,action:null})}catch(e){return l.warn(`Codex skill warning: ${c(e)}`),{success:!1,action:null}}}i(D,"installCodexSkill");async function U(e={}){let t=b();if(!(await g()).installed)return{installed:!1,verified:!0,skillPath:t,message:"Codex not detected"};let a=await I();if(!a)return{installed:!0,verified:!1,skillPath:t,message:"Codex SKILL.md template missing from prjct installation",fix:["Reinstall prjct-cli package","Run `prjct setup`"]};let s=R(a),o=i(async()=>e.autoRepair?(await D()).success:!1,"maybeRepair");if(!await d(t)&&!await o())return{installed:!0,verified:!1,skillPath:t,templateHash:s.templateHash,message:"Codex skill missing at ~/.codex/skills/prjct/SKILL.md",fix:["Run `prjct start` to install Codex skill"]};let n=i(async()=>{let u=await w.readFile(t,"utf-8").catch(()=>""),f=M(u);return{matches:f?.version===m&&f?.templateHash===s.templateHash}},"readVerification");if(!(await n()).matches){if(!await o())return{installed:!0,verified:!1,skillPath:t,templateHash:s.templateHash,message:"Codex skill metadata mismatch (outdated router)",fix:["Run `prjct start` or `prjct setup` to refresh Codex skill"]};if(!(await n()).matches)return{installed:!0,verified:!1,skillPath:t,templateHash:s.templateHash,message:"Codex skill could not be repaired automatically",fix:["Delete ~/.codex/skills/prjct/SKILL.md","Run `prjct setup`"]}}return{installed:!0,verified:!0,skillPath:t,templateHash:s.templateHash,message:"Codex p. router ready"}}i(U,"verifyCodexPRouterReady");export{S as a,R as b,D as c,U as d};
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as k,b as a}from"./chunk-
|
|
8
|
+
import{a as k,b as a}from"./chunk-UK24P7PV.mjs";import{a as E}from"./chunk-A3R47SP6.mjs";import{k as l,o as A}from"./chunk-UH4MD3F3.mjs";import{c as d}from"./chunk-PKDYFXMI.mjs";import{e as c,f as v}from"./chunk-BUDZL4DW.mjs";import{a as n}from"./chunk-E66B27AL.mjs";v();function C(r,e,t){if(t.md){console.log(`> ${e}`);return}k[r](e)}n(C,"notify");var B=n((r,e={})=>C("warn",r,e),"notifyWarn");var D=n((r,e={})=>C("fail",r,e),"notifyFail");function J(r,e={}){return B(r,e),{success:!1,error:r}}n(J,"failWith");function Z(r,e={}){return D(r,e),{success:!1,error:r}}n(Z,"failHard");function ee(r,e){let t=c(r);return e&&D(t,e),{success:!1,error:t}}n(ee,"failFromError");A();import x from"node:path";var f={value:null},$={type:"claude",name:"Claude (Code + Desktop)",isSupported:!0,capabilities:{mcp:!0,filesystem:"mcp",markdown:!0,emojis:!0,colors:!0,interactive:!0,agents:!0},config:{configFile:"CLAUDE.md",commandPrefix:"p.",responseStyle:"rich",dataDir:".prjct",commandsDir:"~/.claude/commands/p"},environment:{hasMCP:!0,sandboxed:!1,persistent:!0,agentSystem:!0}},j={type:"terminal",name:"Terminal/CLI",isSupported:!0,capabilities:{mcp:!1,filesystem:"native",markdown:!1,emojis:!0,colors:!0,interactive:!0,agents:!1},config:{configFile:null,commandPrefix:"prjct",responseStyle:"cli",dataDir:".prjct",commandsDir:null},environment:{hasMCP:!1,sandboxed:!1,persistent:!0,agentSystem:!1}};async function L(){if(process.env.CLAUDE_AGENT||process.env.ANTHROPIC_CLAUDE||global.mcp||process.env.MCP_AVAILABLE)return!0;let r=process.cwd();if(await l(x.join(r,"CLAUDE.md")))return!0;let e=process.env.HOME||process.env.USERPROFILE||"";if(await l(x.join(e,".claude")))return!0;let t=process.cwd();return!!(t.includes("/.claude/")||t.includes("/claude-workspace/"))}n(L,"isClaudeEnvironment");function V(){return{...$}}n(V,"getClaudeAgent");function U(){return{...j}}n(U,"getTerminalAgent");function G(){return!!(process.env.CODEX_SANDBOX||process.env.PRJCT_SANDBOX==="1")}n(G,"isSandboxed");async function T(){if(f.value)return f.value;let r=await L()?V():U();return r.environment={...r.environment,sandboxed:G()},f.value=r,r}n(T,"detect");v();A();import p from"node:fs/promises";var y=class{static{n(this,"RuntimeClaude")}name;type;constructor(){this.name="Claude Code",this.type="claude"}formatResponse(e,t="info"){let i={success:"\u2705",error:"\u274C",warning:"\u26A0\uFE0F",info:"\u2139\uFE0F",celebrate:"\u{1F389}",ship:"\u{1F680}",focus:"\u{1F3AF}",idea:"\u{1F4A1}",progress:"\u{1F4CA}",task:"\u{1F4DD}"};return`${i[t]||i.info} ${e}`}async readFile(e){try{if(global.mcp?.filesystem)return await global.mcp.filesystem.read(e)}catch(t){console.warn(`MCP readFile failed, falling back to fs: ${c(t)}`)}return await p.readFile(e,"utf8")}async writeFile(e,t){try{if(global.mcp?.filesystem)return await global.mcp.filesystem.write(e,t)}catch(i){console.warn(`MCP writeFile failed, falling back to fs: ${c(i)}`)}await p.writeFile(e,t,"utf8")}async listDirectory(e){try{if(global.mcp?.filesystem)return await global.mcp.filesystem.list(e)}catch(t){console.warn(`MCP listDirectory failed, falling back to fs: ${c(t)}`)}return await p.readdir(e)}async fileExists(e){return l(e)}async createDirectory(e){await p.mkdir(e,{recursive:!0})}getTimestamp(){return new Date().toISOString()}formatTaskList(e){return!e||e.length===0?"\u{1F4CB} No tasks queued":`\u{1F4CB} Queue:
|
|
9
9
|
${e.map((t,i)=>`${i+1}. ${t}`).join(`
|
|
10
10
|
`)}`}formatRecap(e){return`\u{1F4CA} Recap
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as R}from"./chunk-HGZQWYBL.mjs";import{a}from"./chunk-ZMLA5SKR.mjs";import{b as h}from"./chunk-
|
|
8
|
+
import{a as R}from"./chunk-HGZQWYBL.mjs";import{a}from"./chunk-ZMLA5SKR.mjs";import{b as h}from"./chunk-ZPAY2NSF.mjs";import{d as l,g as E}from"./chunk-TKXOMN4K.mjs";import{a as c}from"./chunk-E66B27AL.mjs";E();var _="land-receipt",k="judgment-receipt",g="receipt-v1";function D(e){let s=e.trapsSurfaced??[],t=e.decisions??[],n=(e.journal??[]).filter(r=>r.trim()),o=(e.openRisksNext??[]).filter(r=>r.trim()),u=e.cycleDescription?.trim()||null,y=e.tokensIn!=null||e.tokensOut!=null||!!e.model;if(!u&&s.length===0&&t.length===0&&n.length===0&&o.length===0&&!y)return null;let i=["# Judgment Receipt",""],m=[];if(u&&m.push(`cycle: "${a(u,100)}"`),n.length>0&&m.push(`journal: ${n.slice(0,4).map(r=>a(r,70)).join(" \xB7 ")}`),m.length>0&&i.push("## Applied judgment",...m.map(r=>`- ${r}`),""),s.length>0&&i.push("## Traps re-surfaced",...s.slice(0,8).map(r=>`- **[${r.type}]** ${a(r.title,100)} \`${r.id}\``),""),t.length>0&&i.push("## Decisions contested or honored",...t.slice(0,8).map(r=>`- **${r.status}** [${r.type}] ${a(r.title,100)} \`${r.id}\``),""),o.length>0||u){let r=o.length>0?o.slice(0,5).map(d=>`- ${a(d,120)}`):["- Finish or pause open cycle; next agent: `prjct prime` / `prjct work --md`."];i.push("## Open risks / next",...r,"")}if(y){let r=[];if(e.tokensIn!=null||e.tokensOut!=null){let d=e.tokensIn??0,f=e.tokensOut??0;r.push(`tokens in=${d} out=${f} total=${d+f}`)}e.model&&r.push(`model=${e.model}`),e.author&&r.push(`author=${e.author}`),i.push("## Session economics",`- ${r.join(" \xB7 ")}`,"")}return i.push("_Closed-loop judgment continuity \u2014 not bulk memory. Proof of traps prevented and decisions applied._"),i.join(`
|
|
9
9
|
`).trim()}c(D,"buildJudgmentReceipt");function I(e){if(!e)return null;let s=(e.match(/## Traps re-surfaced/g)||[]).length,t=p(e,"Traps re-surfaced"),n=p(e,"Decisions contested or honored"),o=[];return t>0&&o.push(`${t} trap(s) re-surfaced`),n>0&&o.push(`${n} decision(s) tracked`),o.length===0&&o.push("session judgment landed"),`Judgment receipt: ${o.join(", ")}`}c(I,"summarizeJudgmentReceipt");function p(e,s){let t=new RegExp(`## ${s}\\n([\\s\\S]*?)(?=\\n## |\\n_|$)`),n=e.match(t);return n?(n[1].match(/^- /gm)||[]).length:0}c(p,"countSectionBullets");async function S(e,s,t){let n=D(t);if(!n)return{wrote:!1,content:null,summary:null,reason:"nothing-to-receipt"};try{return await h.remember(e,{type:"context",content:n,tags:{source:_,topic:k,capture:g,synthesis:"deterministic"},provenance:"extracted",projectId:s}),{wrote:!0,content:n,summary:I(n)}}catch(o){return{wrote:!1,content:n,summary:I(n),reason:`remember-failed: ${o.message}`}}}c(S,"persistJudgmentReceipt");async function b(e){let s=R(e.projectId,e.cycleId),t=O(e.projectId),n=j(e.projectId);return S(e.projectPath,e.projectId,{cycleDescription:e.cycleDescription,cycleId:e.cycleId,journal:s,trapsSurfaced:t,decisions:n,tokensIn:e.tokensIn,tokensOut:e.tokensOut,model:e.model,author:e.author,openRisksNext:e.cycleDescription?["Open cycle still needs finish or pause before context dies."]:[]})}c(b,"synthesizeJudgmentReceipt");function C(e){try{let s=Date.now()-864e5,n=l.query(e,`SELECT me.id, me.content
|
|
10
10
|
FROM memory_entries me
|
|
11
11
|
JOIN memory_entry_tags t ON t.entry_id = me.id
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{a as f}from"./chunk-HGZQWYBL.mjs";import{a as i}from"./chunk-ZMLA5SKR.mjs";import{b as y}from"./chunk-
|
|
8
|
+
import{a as f}from"./chunk-HGZQWYBL.mjs";import{a as i}from"./chunk-ZMLA5SKR.mjs";import{b as y}from"./chunk-ZPAY2NSF.mjs";import{d as g,g as x}from"./chunk-TKXOMN4K.mjs";import{a}from"./chunk-E66B27AL.mjs";import{execFileSync as S}from"node:child_process";x();var j="land-auto",$="session-close";async function N(t){let o=L(t);if(!o)return{wrote:!1,content:null,reason:"nothing-to-land"};try{return await y.remember(t.projectPath,{type:"context",content:o,tags:{source:j,topic:$,capture:"land-v2",context_schema:"living-v2",synthesis:"deterministic"},provenance:"extracted",projectId:t.projectId}),{wrote:!0,content:o}}catch(r){return{wrote:!1,content:o,reason:`remember-failed: ${r.message}`}}}a(N,"synthesizeLandHandoff");function L(t){let o=t.cycleDescription?.trim()||null,r=f(t.projectId,t.cycleId),u=k(t.projectPath),c=b(t.projectId);if(!o&&r.length===0&&u.length===0&&c.length===0)return null;let e=[];o?e.push(`Session close: Work cycle "${i(o,120)}" still open or just closed.`):e.push("Session close: no open work cycle \u2014 landed repo + capture signals only."),e.push("Context synthesis: Passive land hand-off from durable signals (cycle, journal, commits, auto-captures). Not a model essay."),e.push(`Key data: source=${j}; topic=${$}; capture=land-v2`);let l=[];if(o&&l.push(`cycle="${i(o,100)}"`),r.length>0&&l.push(`journal: ${r.map(s=>i(s,70)).join(" \xB7 ")}`),l.length>0&&e.push(`What happened: ${l.join("; ")}`),r.length>0&&e.push(`Why it mattered: Journal trail shows progression \u2014 ${r.slice(0,2).map(s=>i(s,80)).join(" \xB7 ")}`),c.length>0){let s=c.filter(n=>n.type==="learning"||n.type==="decision"||n.type==="fact").slice(0,4),p=c.filter(n=>n.type==="gotcha"||n.type==="anti-pattern").slice(0,3);s.length>0&&e.push(`Learned this session: ${s.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`),p.length>0&&e.push(`Decision/trap: ${p.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`);let I=new Set([...s,...p]),d=c.filter(n=>!I.has(n)).slice(0,3);d.length>0&&s.length===0&&p.length===0&&e.push(`Decision/trap: ${d.map(n=>`[${n.type}] ${i(n.content,100)}`).join(" \xB7 ")}`)}u.length>0&&e.push(`Outcome: Recent commits: ${u.join("; ")}`),t.author&&e.push(`Who/author: ${t.author}`),t.model&&e.push(`Model: ${t.model}`);let m=t.tokensIn,h=t.tokensOut;if(m!=null||h!=null){let s=(m??0)+(h??0);e.push(`Token usage: in=${m??0} out=${h??0} total=${s} (compound judgment \u2014 not a fresh-window thrash loop)`)}e.push("Feature/domain: session-close"),e.push("Pattern: land auto-synthesis without agent remember"),e.push("Anti-pattern: relying on the model to remember to remember at session end"),e.push("Competitive: next window must `prjct prime` \u2014 act as this developer with SQLite judgment, not re-research from zero (GSD tax).");let w=o!=null?"Finish or pause the open cycle (`prjct status done` / `prjct pause`); next agent should `prjct work --md` or `prjct prime`.":"Next agent: `prjct prime` then pick from `prjct next --md`.";return e.push(`Next implication: ${w}`),e.join(" \xB7 ")}a(L,"buildLandHandoffContent");function k(t){try{return S("git",["log","-5","--oneline","--no-decorate"],{cwd:t,encoding:"utf-8",timeout:3e3,stdio:["ignore","pipe","ignore"]}).split(`
|
|
9
9
|
`).map(r=>r.trim()).filter(Boolean)}catch{return[]}}a(k,"recentCommits");function b(t){try{return g.query(t,`SELECT me.type, me.content
|
|
10
10
|
FROM memory_entries me
|
|
11
11
|
JOIN memory_entry_tags t ON t.entry_id = me.id
|
|
@@ -5,7 +5,7 @@ import { dirname as __pathDirname } from 'path';
|
|
|
5
5
|
const require = __createRequire(import.meta.url);
|
|
6
6
|
const __filename = __fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = __pathDirname(__filename);
|
|
8
|
-
import{d as p}from"./chunk-
|
|
8
|
+
import{d as p}from"./chunk-6EHYPQ5U.mjs";import{e as f}from"./chunk-QIB6Y6AH.mjs";import{b as g}from"./chunk-ZPAY2NSF.mjs";import{e as m,g as _}from"./chunk-TKXOMN4K.mjs";import{a as l}from"./chunk-E66B27AL.mjs";_();var S=8,y=140;function h(d,r){if(r.length===0)return 0;let n=[];try{m.transaction(d,s=>{let i=s.prepare("DELETE FROM memory_embeddings WHERE memory_id = ?"),c=s.prepare("DELETE FROM memory_entries WHERE id = ?"),t=s.prepare("DELETE FROM events WHERE id = ? AND type LIKE 'memory.remember.%'");for(let e of r){try{i.run(e)}catch{}c.run(e).changes&&n.push(e);let a=e.match(/^mem_(\d+)$/);if(a)try{t.run(Number(a[1]))}catch{}}})}catch{return n.length}return n.length}l(h,"hardDeleteEntries");function w(d,r,n){let s=new Map;for(let e of r)s.set(e.type,(s.get(e.type)??0)+1);let i=[...s.entries()].sort((e,o)=>o[1]-e[1]).map(([e,o])=>`${e}\xD7${o}`).join(", "),c=r.map(e=>p(e).replace(/\s+/g," ").trim()).filter(e=>e.length>20).slice(0,S).map(e=>`- ${e.length>y?`${e.slice(0,y-1)}\u2026`:e}`),t=[`Distill of discarded auto-history (${d}).`,`Context synthesis: ${r.length} low-value rows collapsed \u2014 raw history deleted; only this digest remains for the project model.`,`Key data: source=retention-distill; discarded=${r.length}; types=${i}; at=${n}`,"What happened: purged auto-generated / redundant captures that added no excess vs the reference model.","Why it mattered: prevent vault bloat; agents must not re-read detector noise.",`Outcome: ${r.length} raw entries hard-deleted after distillation.`,"Next implication: prefer high-excess judgment; re-run detectors only when code/model changes."];return c.length>0&&t.push(`Sample cues (not full bodies):
|
|
9
9
|
${c.join(`
|
|
10
10
|
`)}`),t.join(" ")}l(w,"buildDistillContent");async function A(d,r,n,s,i){if(s.length<=i)return{discarded:0,digested:!1};let t=[...s].sort((u,b)=>b.rememberedAt.localeCompare(u.rememberedAt)).slice(i);if(t.length===0)return{discarded:0,digested:!1};let e=new Date().toISOString(),o=`auto-distill:${n}`,a=w(n,t,e),E=await g.remember(d,{type:"learning",content:a,tags:{source:"retention-distill",topic:o,capture:"distill-discard-v1",context_schema:"living-v2",synthesis:"deterministic",discarded_count:String(t.length),auto_source:n},provenance:"inferred",projectId:r}).then(()=>!0).catch(()=>!1),D=t.map(u=>u.id);return{discarded:h(r,D),digested:E,digestTopic:o}}l(A,"distillAndDiscardAutoSource");async function v(d,r,n){let s=g.allEntriesForIndex(r),i=new Map;for(let t of s){let e=t.tags?.source;if(!f(e)||e==="retention-distill"||t.tags?.source==="retention-distill")continue;let o=i.get(e)??[];o.push(t),i.set(e,o)}let c=[];for(let[t,e]of i){if(e.length<=n)continue;let o=await A(d,r,t,e,n);c.push(o)}return{discarded:c.reduce((t,e)=>t+e.discarded,0),digests:c.filter(t=>t.digested).length}}l(v,"distillAndDiscardAllAutoSources");function x(d,r,n=1e3){let s=Date.now()-r*864e5;try{let i=m.query(d,`SELECT id, type, content FROM memory_entries
|
|
11
11
|
WHERE deleted_at IS NOT NULL AND deleted_at < ?
|