specbox 6.29.1 → 6.30.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/README.md +5 -3
- package/bin/specbox.mjs +38 -2
- package/hooks/app-docs-sync-guard.mjs +326 -0
- package/hooks/branch-guard.mjs +79 -0
- package/hooks/checkpoint-freshness-guard.mjs +56 -0
- package/hooks/commit-spec-guard.mjs +61 -0
- package/hooks/context-budget-guard.mjs +130 -0
- package/hooks/design-gate.mjs +144 -0
- package/hooks/design-review-gate.mjs +102 -0
- package/hooks/design-system-gate.mjs +134 -0
- package/hooks/e2e-gate.mjs +86 -0
- package/hooks/file-ownership-guard.mjs +163 -0
- package/hooks/freeform-fragment.mjs +160 -0
- package/hooks/freeform-path-guard.mjs +172 -0
- package/hooks/healing-budget-guard.mjs +83 -0
- package/hooks/hooks-history.json +176 -0
- package/hooks/hooks-manifest.json +51 -0
- package/hooks/implement-checkpoint.mjs +46 -0
- package/hooks/implement-healing.mjs +38 -0
- package/hooks/lib/autopilot.mjs +240 -0
- package/hooks/lib/config.mjs +117 -0
- package/hooks/lib/decisiones.mjs +58 -0
- package/hooks/lib/design-gaps.mjs +272 -0
- package/hooks/lib/execution-context.mjs +69 -0
- package/hooks/lib/freeform-fragment.mjs +379 -0
- package/hooks/lib/freeform-path.mjs +115 -0
- package/hooks/lib/handoff-builder.mjs +388 -0
- package/hooks/lib/heartbeat-send.mjs +91 -0
- package/hooks/lib/heartbeat.mjs +110 -0
- package/hooks/lib/mcp-client-io.mjs +210 -0
- package/hooks/lib/mcp-client.mjs +91 -0
- package/hooks/lib/native-reservation-revalidate.mjs +80 -0
- package/hooks/lib/output.mjs +70 -0
- package/hooks/lib/ownership-map.mjs +162 -0
- package/hooks/lib/token-counter.mjs +81 -0
- package/hooks/lib/utils.mjs +235 -0
- package/hooks/no-bypass-guard.mjs +57 -0
- package/hooks/on-session-end.mjs +163 -0
- package/hooks/pipeline-phase-guard.mjs +140 -0
- package/hooks/post-implement-validate.mjs +61 -0
- package/hooks/pre-commit-lint.mjs +76 -0
- package/hooks/pre-prd-discovery-check.mjs +242 -0
- package/hooks/pre-read-budget-guard.mjs +83 -0
- package/hooks/quality-first-guard.mjs +85 -0
- package/hooks/read-tracker.mjs +33 -0
- package/hooks/session-heartbeat.mjs +113 -0
- package/hooks/session-start.mjs +159 -0
- package/hooks/settings-hooks.json +363 -0
- package/hooks/spec-guard.mjs +152 -0
- package/hooks/stripe-safety-guard.mjs +262 -0
- package/hooks/uc-lifecycle-guard.mjs +87 -0
- package/lib/hooks.mjs +156 -0
- package/lib/install.mjs +9 -0
- package/lib/internal.mjs +26 -3
- package/lib/mcp-headers.mjs +31 -3
- package/lib/messages.mjs +41 -0
- package/package.json +5 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app-docs-sync-guard.mjs": [
|
|
3
|
+
"2c285878269576cfe510e565fc5847301a4cb73efbec0f42d4847cad55526130",
|
|
4
|
+
"71f09545b57c143b013c2e532366bfdd1e1a2ae49c7644c9e12e2ab5324d03d3"
|
|
5
|
+
],
|
|
6
|
+
"branch-guard.mjs": [
|
|
7
|
+
"2185062de5f8672236a957a1ee4e7a6057c656a105bf886685f9e7bf8025c215"
|
|
8
|
+
],
|
|
9
|
+
"checkpoint-freshness-guard.mjs": [
|
|
10
|
+
"06c9f9baee0462352923346d4319183ff3b89e9e152b923bd7c0f936f20e1518",
|
|
11
|
+
"b8b6f438b6943568682776177bdac6b778df4c464e3317eb2385ed2b1b6afa96"
|
|
12
|
+
],
|
|
13
|
+
"commit-spec-guard.mjs": [
|
|
14
|
+
"0437bacef5d022512c37d3636bc4a9112b6bb0b13421ba35b3bb77a6eb82d900",
|
|
15
|
+
"b8d79538f6627cb19a224399770a439b4e11cd70ee5c61673dfd6ed59a939395"
|
|
16
|
+
],
|
|
17
|
+
"context-budget-guard.mjs": [
|
|
18
|
+
"9714985624215ca43f78536b47254dde8f49bb56396a8c4c40740c5fb36a69dd",
|
|
19
|
+
"a25ec6ccd8c290a8b7e2d2f7c282a57ba5a16aebbe0ce19b3981da3cba803479"
|
|
20
|
+
],
|
|
21
|
+
"design-gate.mjs": [
|
|
22
|
+
"82958af64ecbdba19dda1de39c5ebdf7cef5a4489a2269d503628297403af4f7",
|
|
23
|
+
"eab29c9898f236d9b2867e569817005f101df4e99d679484f7bfd93536622919",
|
|
24
|
+
"fef11c431c2f70218a3eca97c255c10585de0dbcfef1d4ec26fad0d4702a8dbb"
|
|
25
|
+
],
|
|
26
|
+
"design-system-gate.mjs": [
|
|
27
|
+
"a824667193fe62c63a9e196e45e77ad255a6b0008a4c69fe767f0fb7a5052089",
|
|
28
|
+
"419018cadb3e0a4fe0def1c423fed7013b76b2f121312acadbc99fc8e30b8ff5"
|
|
29
|
+
],
|
|
30
|
+
"e2e-gate.mjs": [
|
|
31
|
+
"8c221a3bf06b45c67cb2779d957fae3cba883358b5f77fb1b2f7c32f86a3d29d",
|
|
32
|
+
"02e239816cb429f76034088a5370f63a08facce01b4ffd52b338a66acf13028d"
|
|
33
|
+
],
|
|
34
|
+
"file-ownership-guard.mjs": [
|
|
35
|
+
"468851e6e711d68d452172995e9fbce7ff3220de387c0f44e04833997591bb11",
|
|
36
|
+
"d8a84370766966cce70b76811de9dd150d170a79c4cb7b9e6b120cfad86a6932"
|
|
37
|
+
],
|
|
38
|
+
"freeform-path-guard.mjs": [
|
|
39
|
+
"e909f223518c7f1885397328ebcaf422b5f7e450b690dfd685365d9563da544e",
|
|
40
|
+
"9ded19e96b0738de5aaf43a97eaa1d88ecd3b341efd432c0b32eb312c4bf5e0a"
|
|
41
|
+
],
|
|
42
|
+
"healing-budget-guard.mjs": [
|
|
43
|
+
"84254c93028a3ae430795c183242510fc8f60300615d65409f410606226fad9a",
|
|
44
|
+
"c49c6c34f99545e4009ad88ed9f7eef737e35ce39c11a05d41ad8f976ffae09f"
|
|
45
|
+
],
|
|
46
|
+
"implement-checkpoint.mjs": [
|
|
47
|
+
"7e23eefd5cfb3a07fb82500e855858ac3fae6faea647127afa8b693f062d1b54",
|
|
48
|
+
"f3f219779a1ac4108bc3aabcc7311e9135d9c7795c126a2b5d659e743f5a5a64"
|
|
49
|
+
],
|
|
50
|
+
"implement-healing.mjs": [
|
|
51
|
+
"75392f7de628c3d1d88bf882007bd3281cfedaf0b73940999698daa68ff02411"
|
|
52
|
+
],
|
|
53
|
+
"lib/autopilot.mjs": [
|
|
54
|
+
"cf2a5eab8614fe2c52d403ae5fe69283f85c2bb63bc492403b128f5c8099fa20",
|
|
55
|
+
"c61562bd7bdac1ac07e28778528b6d6ddd961ab48f504a75c2723f5c1ecc7042",
|
|
56
|
+
"317eabaed8dead40f3d55e642b7465a3ba4e884523e0ae7b933e197153fc6f95"
|
|
57
|
+
],
|
|
58
|
+
"lib/config.mjs": [
|
|
59
|
+
"bef622d06108aa64ec3c2d0edd1b1c82ad442476a1257b271c81838813ff1d57"
|
|
60
|
+
],
|
|
61
|
+
"lib/design-gaps.mjs": [
|
|
62
|
+
"d356d695d7afbafdc6fc420ed66603f11aa523be245bbd7a717d141a4a00701e"
|
|
63
|
+
],
|
|
64
|
+
"lib/execution-context.mjs": [
|
|
65
|
+
"953eb7ec86f6893288df4e76c9c63c737c8e8ba4e337271402ce5eaca00330fa"
|
|
66
|
+
],
|
|
67
|
+
"lib/freeform-path.mjs": [
|
|
68
|
+
"976470527a374a12c4db6643f6ba4ef9d245ce02c33ed3cc6255c95e6b4a4346",
|
|
69
|
+
"9ea85781821ae911873d1dbd13d58811a6c88e50480d2b3b378725ce2872be0c"
|
|
70
|
+
],
|
|
71
|
+
"lib/handoff-builder.mjs": [
|
|
72
|
+
"9c0f8033953d26a50bc385c700de96d49f2c5d7eeaa06d74c0d30fffeba243d3",
|
|
73
|
+
"2f7ffd554484d9560f525ab2548c240bac65b23bbe6eb8907e64c66bd818e22d"
|
|
74
|
+
],
|
|
75
|
+
"lib/mcp-client-io.mjs": [
|
|
76
|
+
"e863d22434fd9a1abf57804291b38e72d2236a0b7ff39460150ac883b2a7b780"
|
|
77
|
+
],
|
|
78
|
+
"lib/native-reservation-revalidate.mjs": [
|
|
79
|
+
"1b394e8eb5d01480b71ac0976d636814483891e9f862edd5ac0216ac0128b023"
|
|
80
|
+
],
|
|
81
|
+
"lib/output.mjs": [
|
|
82
|
+
"43b1c66452609a08f717468267462041d9c1c279633b773023cb17914d7c15b0",
|
|
83
|
+
"a568c736917720349b2b2527eb5b480bb11059a9253f81473f5b5c2c164b04bc"
|
|
84
|
+
],
|
|
85
|
+
"lib/ownership-map.mjs": [
|
|
86
|
+
"21946608331a39e8c76eb2ba3860b5ebb351aa154f31801e768703bc4ae66b9a"
|
|
87
|
+
],
|
|
88
|
+
"lib/token-counter.mjs": [
|
|
89
|
+
"ca637273dcf731c7a951f28b8307d13de06d311cf85741ef56c4e3df9eaa231e"
|
|
90
|
+
],
|
|
91
|
+
"lib/utils.mjs": [
|
|
92
|
+
"f4f284fd88c11dd9853e76aa3d44e86127180f210ea981c6c69aa75dbfdc57c8",
|
|
93
|
+
"4c21939aac114a11a68e2519d5d99f7f0bf482f08af0dc9e51ac715cc93ddfa2"
|
|
94
|
+
],
|
|
95
|
+
"no-bypass-guard.mjs": [
|
|
96
|
+
"749042483278118c60aeeeab792625ecba1e9da48008c1ae6d7a9befbc37802f",
|
|
97
|
+
"055a6d19e2e6a8f1b10b51fd6e0f3677911565cad5063fc52d46d4003a7d76db",
|
|
98
|
+
"d7a31ac193edb8dedda2d9d696aa747612f7348ee475e57653ae0813f9b36189"
|
|
99
|
+
],
|
|
100
|
+
"on-session-end.mjs": [
|
|
101
|
+
"fd5b7cf3bf2c419fd4125e21b338c4c849a4daaef21d5e15253caed54965b40c"
|
|
102
|
+
],
|
|
103
|
+
"pipeline-phase-guard.mjs": [
|
|
104
|
+
"e9161c1d1fb95009337a692272e05d7f6270cb9390235cdf823f0d80cd0aa29e",
|
|
105
|
+
"761b82c8b0c4884eba54d529e1f726d547003a6efe05425b45a1a0b77b90fe0d"
|
|
106
|
+
],
|
|
107
|
+
"post-implement-validate.mjs": [
|
|
108
|
+
"67508673b9eeb75532b5850fe47b5f071185089771a38d786bc15bf8bd73ebce",
|
|
109
|
+
"25e5ea280c945f707ca8476555fca7a44c93aec1018eef06702c908a071df0cd"
|
|
110
|
+
],
|
|
111
|
+
"pre-commit-lint.mjs": [
|
|
112
|
+
"a9a3b797a2e458fd4de93f739eaab5a9d124ce9efc7021d659aa308317bbd072",
|
|
113
|
+
"87700335bb6f6b6e7cb4ce611215d1912b6090bfc1702e328b56e65a3e8980b3",
|
|
114
|
+
"ae2c4bba142d65fa05ea9f7c46ad56558205b0962c7eaf1d73cfd200c6564b60",
|
|
115
|
+
"348adbbfd29e52ebc6512a46b19f5e3c8bde4ae2139c013b96659fdc66456eab"
|
|
116
|
+
],
|
|
117
|
+
"pre-prd-discovery-check.mjs": [
|
|
118
|
+
"0cda2364b195c06dfdbf34f336ca1449a9b335ef54519551ed8ebdf905bb0838",
|
|
119
|
+
"f5f74dcb2146f252d40314668855939ccf8821c43b95b943b073272516cb2050",
|
|
120
|
+
"2eda49648e31dd8720f70b3dcfca2782df9e950b6628ce0db8948c448253c2be"
|
|
121
|
+
],
|
|
122
|
+
"pre-read-budget-guard.mjs": [
|
|
123
|
+
"d945eec412044ce0393284392276a69daff49c2c1a85a5043d5d5d962eb6156a",
|
|
124
|
+
"76aeb98026f7fde19bb4d57749ff59b08cdfff0ba6f7188cafc28762773bed34"
|
|
125
|
+
],
|
|
126
|
+
"quality-first-guard.mjs": [
|
|
127
|
+
"1a664c72b60c0c3845d6430513dedba4b414c250f94d2f3e5578d55ce00165ac",
|
|
128
|
+
"93881ddbf47fdc2a75392815153f755d1c5f0345c6a97586777eaebd1699e62d"
|
|
129
|
+
],
|
|
130
|
+
"read-tracker.mjs": [
|
|
131
|
+
"7364b46a70c9ce4aa931d07ababe6adf597088be8372bb02086649ec88be06a2",
|
|
132
|
+
"5a22248f9d39dcc5c71abb6e2c49b8d7be3860f399023ad59f3c50e92917c298"
|
|
133
|
+
],
|
|
134
|
+
"session-start.mjs": [
|
|
135
|
+
"2203a5e07360c1c725807bb2b86fd516e68f19adca8533b26ac36e95afc4aea7",
|
|
136
|
+
"0e141afe55e00591b2a09848be4930785947566f6688102fe02cfa9c8e5d0a85"
|
|
137
|
+
],
|
|
138
|
+
"spec-guard.mjs": [
|
|
139
|
+
"8dccc74b4cf1986497c1db3b32ec52a5a842267e1ce3372b3d6fc10ba0c402e8",
|
|
140
|
+
"3a0d19ecaf523d5bd220f1ba88902e43e56caa700f115a9d8b276e48b576a5da",
|
|
141
|
+
"3524703693ef53fa3f4f9282b7bfc857ff89ce60212724526b1ed4a1fcd12563"
|
|
142
|
+
],
|
|
143
|
+
"stripe-safety-guard.mjs": [
|
|
144
|
+
"fd38c72e91c0e74ecb7dc8ccc0fa9a5f9aaa1ceeac583d13f342503f098f718a",
|
|
145
|
+
"5d7c0a9524657fe47e6ec4ea0eeb055d238f133eeac488c145cb1d5ae88b96de"
|
|
146
|
+
],
|
|
147
|
+
"uc-lifecycle-guard.mjs": [
|
|
148
|
+
"e5c31e58db639bd304faf244fd3c4ccecfc854beba2182ae6d940f52afc28808",
|
|
149
|
+
"beca70f275b1974d6609ae47f9acdbc0842d3c21e01fe9852d3a7e536f501103",
|
|
150
|
+
"2bedf19d5e36d13dff6d8cd95855ca2b5a7f47d662cc3a554c3e2f80ede199fd"
|
|
151
|
+
],
|
|
152
|
+
"design-review-gate.mjs": [
|
|
153
|
+
"b2cc1ba81578102fdab4e559f8f4e8a0c37be41df75ef7ef4f531d766c1362d0"
|
|
154
|
+
],
|
|
155
|
+
"lib/decisiones.mjs": [
|
|
156
|
+
"6bed3bd37320b6d87f4c77fcac27ed55a6b37776d84a0d4eb2d9cab0c474a520"
|
|
157
|
+
],
|
|
158
|
+
"lib/heartbeat-send.mjs": [
|
|
159
|
+
"739d4fe4b573e99fffdad2252a75cb7dcf18526dda72f1db6cff25b16f76383a"
|
|
160
|
+
],
|
|
161
|
+
"lib/heartbeat.mjs": [
|
|
162
|
+
"0da0045e6a350f71c54fe972dc2a97880b8eab0aaeaab83595ff3ef3ac0fdae6"
|
|
163
|
+
],
|
|
164
|
+
"lib/mcp-client.mjs": [
|
|
165
|
+
"02610127d29b4c001a5a44ad3bff74d954808f8e13b1a20a378a1da03274abbd"
|
|
166
|
+
],
|
|
167
|
+
"session-heartbeat.mjs": [
|
|
168
|
+
"6aece1e95c2ef4dcb7e0f7699f5d1e75537857b863b34be108ed0fe67112781a"
|
|
169
|
+
],
|
|
170
|
+
"freeform-fragment.mjs": [
|
|
171
|
+
"fcb1fc9a1494c1c63870bdec08368bf3c815b1372e220a6311535b0431c86061"
|
|
172
|
+
],
|
|
173
|
+
"lib/freeform-fragment.mjs": [
|
|
174
|
+
"d30a15b495cf18cad571e8582b4ce943a75aa4ad8efc5fa11e22420b505dad12"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6.30.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"app-docs-sync-guard.mjs": "71f09545b57c143b013c2e532366bfdd1e1a2ae49c7644c9e12e2ab5324d03d3",
|
|
5
|
+
"branch-guard.mjs": "2185062de5f8672236a957a1ee4e7a6057c656a105bf886685f9e7bf8025c215",
|
|
6
|
+
"checkpoint-freshness-guard.mjs": "b8b6f438b6943568682776177bdac6b778df4c464e3317eb2385ed2b1b6afa96",
|
|
7
|
+
"commit-spec-guard.mjs": "b8d79538f6627cb19a224399770a439b4e11cd70ee5c61673dfd6ed59a939395",
|
|
8
|
+
"context-budget-guard.mjs": "a25ec6ccd8c290a8b7e2d2f7c282a57ba5a16aebbe0ce19b3981da3cba803479",
|
|
9
|
+
"design-gate.mjs": "fef11c431c2f70218a3eca97c255c10585de0dbcfef1d4ec26fad0d4702a8dbb",
|
|
10
|
+
"design-review-gate.mjs": "b2cc1ba81578102fdab4e559f8f4e8a0c37be41df75ef7ef4f531d766c1362d0",
|
|
11
|
+
"design-system-gate.mjs": "419018cadb3e0a4fe0def1c423fed7013b76b2f121312acadbc99fc8e30b8ff5",
|
|
12
|
+
"e2e-gate.mjs": "02e239816cb429f76034088a5370f63a08facce01b4ffd52b338a66acf13028d",
|
|
13
|
+
"file-ownership-guard.mjs": "d8a84370766966cce70b76811de9dd150d170a79c4cb7b9e6b120cfad86a6932",
|
|
14
|
+
"freeform-fragment.mjs": "fcb1fc9a1494c1c63870bdec08368bf3c815b1372e220a6311535b0431c86061",
|
|
15
|
+
"freeform-path-guard.mjs": "9ded19e96b0738de5aaf43a97eaa1d88ecd3b341efd432c0b32eb312c4bf5e0a",
|
|
16
|
+
"healing-budget-guard.mjs": "c49c6c34f99545e4009ad88ed9f7eef737e35ce39c11a05d41ad8f976ffae09f",
|
|
17
|
+
"implement-checkpoint.mjs": "f3f219779a1ac4108bc3aabcc7311e9135d9c7795c126a2b5d659e743f5a5a64",
|
|
18
|
+
"implement-healing.mjs": "75392f7de628c3d1d88bf882007bd3281cfedaf0b73940999698daa68ff02411",
|
|
19
|
+
"no-bypass-guard.mjs": "d7a31ac193edb8dedda2d9d696aa747612f7348ee475e57653ae0813f9b36189",
|
|
20
|
+
"on-session-end.mjs": "fd5b7cf3bf2c419fd4125e21b338c4c849a4daaef21d5e15253caed54965b40c",
|
|
21
|
+
"pipeline-phase-guard.mjs": "761b82c8b0c4884eba54d529e1f726d547003a6efe05425b45a1a0b77b90fe0d",
|
|
22
|
+
"post-implement-validate.mjs": "25e5ea280c945f707ca8476555fca7a44c93aec1018eef06702c908a071df0cd",
|
|
23
|
+
"pre-commit-lint.mjs": "348adbbfd29e52ebc6512a46b19f5e3c8bde4ae2139c013b96659fdc66456eab",
|
|
24
|
+
"pre-prd-discovery-check.mjs": "2eda49648e31dd8720f70b3dcfca2782df9e950b6628ce0db8948c448253c2be",
|
|
25
|
+
"pre-read-budget-guard.mjs": "76aeb98026f7fde19bb4d57749ff59b08cdfff0ba6f7188cafc28762773bed34",
|
|
26
|
+
"quality-first-guard.mjs": "93881ddbf47fdc2a75392815153f755d1c5f0345c6a97586777eaebd1699e62d",
|
|
27
|
+
"read-tracker.mjs": "5a22248f9d39dcc5c71abb6e2c49b8d7be3860f399023ad59f3c50e92917c298",
|
|
28
|
+
"session-heartbeat.mjs": "6aece1e95c2ef4dcb7e0f7699f5d1e75537857b863b34be108ed0fe67112781a",
|
|
29
|
+
"session-start.mjs": "0e141afe55e00591b2a09848be4930785947566f6688102fe02cfa9c8e5d0a85",
|
|
30
|
+
"spec-guard.mjs": "3524703693ef53fa3f4f9282b7bfc857ff89ce60212724526b1ed4a1fcd12563",
|
|
31
|
+
"stripe-safety-guard.mjs": "5d7c0a9524657fe47e6ec4ea0eeb055d238f133eeac488c145cb1d5ae88b96de",
|
|
32
|
+
"uc-lifecycle-guard.mjs": "2bedf19d5e36d13dff6d8cd95855ca2b5a7f47d662cc3a554c3e2f80ede199fd",
|
|
33
|
+
"lib/autopilot.mjs": "317eabaed8dead40f3d55e642b7465a3ba4e884523e0ae7b933e197153fc6f95",
|
|
34
|
+
"lib/config.mjs": "bef622d06108aa64ec3c2d0edd1b1c82ad442476a1257b271c81838813ff1d57",
|
|
35
|
+
"lib/decisiones.mjs": "6bed3bd37320b6d87f4c77fcac27ed55a6b37776d84a0d4eb2d9cab0c474a520",
|
|
36
|
+
"lib/design-gaps.mjs": "d356d695d7afbafdc6fc420ed66603f11aa523be245bbd7a717d141a4a00701e",
|
|
37
|
+
"lib/execution-context.mjs": "953eb7ec86f6893288df4e76c9c63c737c8e8ba4e337271402ce5eaca00330fa",
|
|
38
|
+
"lib/freeform-fragment.mjs": "d30a15b495cf18cad571e8582b4ce943a75aa4ad8efc5fa11e22420b505dad12",
|
|
39
|
+
"lib/freeform-path.mjs": "9ea85781821ae911873d1dbd13d58811a6c88e50480d2b3b378725ce2872be0c",
|
|
40
|
+
"lib/handoff-builder.mjs": "2f7ffd554484d9560f525ab2548c240bac65b23bbe6eb8907e64c66bd818e22d",
|
|
41
|
+
"lib/heartbeat-send.mjs": "739d4fe4b573e99fffdad2252a75cb7dcf18526dda72f1db6cff25b16f76383a",
|
|
42
|
+
"lib/heartbeat.mjs": "0da0045e6a350f71c54fe972dc2a97880b8eab0aaeaab83595ff3ef3ac0fdae6",
|
|
43
|
+
"lib/mcp-client-io.mjs": "e863d22434fd9a1abf57804291b38e72d2236a0b7ff39460150ac883b2a7b780",
|
|
44
|
+
"lib/mcp-client.mjs": "02610127d29b4c001a5a44ad3bff74d954808f8e13b1a20a378a1da03274abbd",
|
|
45
|
+
"lib/native-reservation-revalidate.mjs": "1b394e8eb5d01480b71ac0976d636814483891e9f862edd5ac0216ac0128b023",
|
|
46
|
+
"lib/output.mjs": "a568c736917720349b2b2527eb5b480bb11059a9253f81473f5b5c2c164b04bc",
|
|
47
|
+
"lib/ownership-map.mjs": "21946608331a39e8c76eb2ba3860b5ebb351aa154f31801e768703bc4ae66b9a",
|
|
48
|
+
"lib/token-counter.mjs": "ca637273dcf731c7a951f28b8307d13de06d311cf85741ef56c4e3df9eaa231e",
|
|
49
|
+
"lib/utils.mjs": "4c21939aac114a11a68e2519d5d99f7f0bf482f08af0dc9e51ac715cc93ddfa2"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* implement-checkpoint.mjs — Hook helper: saves checkpoint after each /implement phase
|
|
4
|
+
* Usage: node implement-checkpoint.mjs <feature> <phase_number> <phase_name>
|
|
5
|
+
* Called from within the /implement Skill, not as an automatic hook.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { git, mkdir, now } from './lib/utils.mjs';
|
|
9
|
+
import { writeFileSync } from 'fs';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
|
|
12
|
+
const feature = process.argv[2] || '';
|
|
13
|
+
const phase = process.argv[3] || '';
|
|
14
|
+
const phaseName = process.argv[4] || '';
|
|
15
|
+
const branch = git('branch --show-current') || 'unknown';
|
|
16
|
+
|
|
17
|
+
if (!feature || !phase) {
|
|
18
|
+
console.log('Usage: implement-checkpoint.mjs <feature> <phase> <phase_name>');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const evidenceDir = `.quality/evidence/${feature}`;
|
|
23
|
+
mkdir(evidenceDir);
|
|
24
|
+
|
|
25
|
+
const timestamp = now();
|
|
26
|
+
|
|
27
|
+
const checkpoint = {
|
|
28
|
+
feature,
|
|
29
|
+
phase: Number(phase),
|
|
30
|
+
phase_name: phaseName,
|
|
31
|
+
branch,
|
|
32
|
+
timestamp,
|
|
33
|
+
status: 'complete',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
writeFileSync(
|
|
37
|
+
join(evidenceDir, 'checkpoint.json'),
|
|
38
|
+
JSON.stringify(checkpoint, null, 2) + '\n',
|
|
39
|
+
'utf-8'
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
console.log(`[CHECKPOINT] Phase ${phase} (${phaseName}) saved for ${feature}`);
|
|
43
|
+
|
|
44
|
+
// v6.1.0 Cloud Cutover: remote heartbeat + mcp-report dispatch removed.
|
|
45
|
+
// US-99 · UC-9901: el latido lo manda session-heartbeat.mjs, que lee este checkpoint para la fase.
|
|
46
|
+
// (Desde 25c9426 faltaba el import de join y el checkpoint no se escribía.)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* implement-healing.mjs — Hook helper: logs self-healing event in evidence
|
|
4
|
+
* Usage: node implement-healing.mjs <feature> <phase> <level> <action> [result]
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { mkdir, now, appendLine } from './lib/utils.mjs';
|
|
8
|
+
import { join } from 'path';
|
|
9
|
+
|
|
10
|
+
const feature = process.argv[2] || '';
|
|
11
|
+
const phase = process.argv[3] || '';
|
|
12
|
+
const level = process.argv[4] || '';
|
|
13
|
+
const action = process.argv[5] || '';
|
|
14
|
+
const result = process.argv[6] || 'attempted';
|
|
15
|
+
const timestamp = now();
|
|
16
|
+
|
|
17
|
+
if (!feature || !phase || !level) {
|
|
18
|
+
console.log('Usage: implement-healing.mjs <feature> <phase> <level> <action> [result]');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const evidenceDir = `.quality/evidence/${feature}`;
|
|
23
|
+
mkdir(evidenceDir);
|
|
24
|
+
|
|
25
|
+
const entry = JSON.stringify({
|
|
26
|
+
phase: Number(phase),
|
|
27
|
+
level: Number(level),
|
|
28
|
+
action,
|
|
29
|
+
result,
|
|
30
|
+
timestamp,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
appendLine(join(evidenceDir, 'healing.jsonl'), entry);
|
|
34
|
+
|
|
35
|
+
console.log(`[HEALING] Level ${level} action logged for ${feature} phase ${phase}`);
|
|
36
|
+
|
|
37
|
+
// v6.1.0 Cloud Cutover: mcp-report.mjs no longer exists (UC-7204 removes the
|
|
38
|
+
// leftover dispatch). The healing event stays in .quality/evidence/ above.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/autopilot.mjs — Autopilot policy engine for SpecBox skills and hooks (v5.29.0).
|
|
3
|
+
*
|
|
4
|
+
* Reads `.claude/settings.local.json` → `specbox.autopilot` and decides whether
|
|
5
|
+
* a given decision_key should be auto-confirmed, queued (deferred), asked
|
|
6
|
+
* synchronously, or always blocked.
|
|
7
|
+
*
|
|
8
|
+
* Policy tiers:
|
|
9
|
+
* low — every decision asks (v5.28 behavior, default if config absent)
|
|
10
|
+
* conservador — only cosmetic (tokens, stitch_design_per_screen) auto-confirm
|
|
11
|
+
* equilibrado — cosmetic + visual derived (veg_preview, image_cost_under_budget) when high confidence
|
|
12
|
+
* agresivo — equilibrado + lenient definition_quality_gate when AC score >=0.7
|
|
13
|
+
*
|
|
14
|
+
* Inviolable: destructive_action, branch_to_main_push, image_cost_over_budget
|
|
15
|
+
* never auto-confirm regardless of tier.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { readJsonFile, appendLine } from './utils.mjs';
|
|
19
|
+
import { join } from 'path';
|
|
20
|
+
|
|
21
|
+
// ── Decision keys catalog ────────────────────────────────────────────
|
|
22
|
+
//
|
|
23
|
+
// Each entry maps a decision_key (used in skills/hooks) to its family,
|
|
24
|
+
// rule per tier, and inviolable status. Skills consult this table via
|
|
25
|
+
// `evaluateDecision(decisionKey, context)` instead of hardcoding policy.
|
|
26
|
+
|
|
27
|
+
export const DECISION_KEYS = {
|
|
28
|
+
// Cosmetic — safe to auto-confirm: regenerable, no monetary cost.
|
|
29
|
+
tokens_confirmation: { family: 'cosmetic', tiers: { low: 'ask', conservador: 'auto', equilibrado: 'auto', agresivo: 'auto' } },
|
|
30
|
+
stitch_design_per_screen: { family: 'cosmetic', tiers: { low: 'ask', conservador: 'auto', equilibrado: 'auto', agresivo: 'auto' } },
|
|
31
|
+
design_system_update_check: { family: 'cosmetic', tiers: { low: 'ask', conservador: 'auto', equilibrado: 'auto', agresivo: 'auto' } },
|
|
32
|
+
|
|
33
|
+
// VEG / visual derived — auto-confirm only when confidence is high enough.
|
|
34
|
+
veg_preview: { family: 'visual_derived', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_score_high', agresivo: 'auto_if_score_low' }, scoreThreshold: { equilibrado: 0.8, agresivo: 0.7 } },
|
|
35
|
+
image_cost_under_budget: { family: 'visual_derived', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_under_budget', agresivo: 'auto_if_under_budget' } },
|
|
36
|
+
|
|
37
|
+
// Calidad de spec — sólo el modo agresivo deja pasar AC con score alto.
|
|
38
|
+
definition_quality_gate: { family: 'spec_quality', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'auto_if_score_high' }, scoreThreshold: { agresivo: 0.7 } },
|
|
39
|
+
feature_problem_definition: { family: 'spec_quality', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
40
|
+
// US-78 / UC-7805: a qué épica va la feature; la decide una persona (el PRD puede traerla ya declarada).
|
|
41
|
+
feature_epic_assignment: { family: 'spec_quality', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
42
|
+
feature_ui_interaction_profile: { family: 'spec_quality', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_app_prd', agresivo: 'auto_if_app_prd' } },
|
|
43
|
+
feedback_field_classification: { family: 'spec_quality', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
44
|
+
|
|
45
|
+
// Arquitectónico — heredables desde app_prd/app_spec si están definidos.
|
|
46
|
+
feature_aesthetic_direction: { family: 'architectural', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_app_spec', agresivo: 'auto_if_app_spec' } },
|
|
47
|
+
backend_selection: { family: 'architectural', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_freeform_default', agresivo: 'auto_freeform_default' } },
|
|
48
|
+
veg_mode_selection: { family: 'architectural', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_app_spec', agresivo: 'auto_if_app_spec' } },
|
|
49
|
+
|
|
50
|
+
// Operativo — preguntas de aclaración / advertencia.
|
|
51
|
+
origin_detection: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'auto_if_unique', agresivo: 'auto_if_unique' } },
|
|
52
|
+
uncommitted_changes_warning: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
53
|
+
stitch_api_key_missing: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
54
|
+
stitch_config_decision: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
55
|
+
// US-29 — visual provider del VEG (stitch/claude_design). Elección del usuario: siempre ask.
|
|
56
|
+
visual_provider_selection: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
57
|
+
claude_design_config_check: { family: 'operational', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' } },
|
|
58
|
+
|
|
59
|
+
// Inviolables — siempre síncronos.
|
|
60
|
+
destructive_action: { family: 'destructive', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' }, inviolable: true },
|
|
61
|
+
image_cost_over_budget: { family: 'destructive', tiers: { low: 'ask', conservador: 'ask', equilibrado: 'ask', agresivo: 'ask' }, inviolable: true },
|
|
62
|
+
branch_to_main_push: { family: 'destructive', tiers: { low: 'block', conservador: 'block', equilibrado: 'block', agresivo: 'block' }, inviolable: true },
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* US-99 · UC-9902: decisiones que nunca se aplazan aunque la cola esté activa (las mismas que
|
|
67
|
+
* INVIOLABLE_FOR_QUEUE de server/app_docs/queue.py): o son irreversibles o definen la feature.
|
|
68
|
+
*/
|
|
69
|
+
export const NOT_QUEUEABLE = new Set([
|
|
70
|
+
'destructive_action',
|
|
71
|
+
'image_cost_over_budget',
|
|
72
|
+
'branch_to_main_push',
|
|
73
|
+
'definition_quality_gate',
|
|
74
|
+
'feature_problem_definition',
|
|
75
|
+
'feedback_field_classification',
|
|
76
|
+
]);
|
|
77
|
+
|
|
78
|
+
// ── Config loading ───────────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
const VALID_TIERS = ['low', 'conservador', 'equilibrado', 'agresivo'];
|
|
81
|
+
const DEFAULT_BUDGET_EUR = 5;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Load autopilot config from .claude/settings.local.json.
|
|
85
|
+
* Returns a normalized object with `level`, `image_budget_eur_per_feature`,
|
|
86
|
+
* `auto_confirm_overrides`, `always_ask_overrides`. Falls back to safe
|
|
87
|
+
* defaults (`level: "low"`) when no config exists — matches v5.28 behavior.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} [projectPath] - Project root (default: cwd).
|
|
90
|
+
*/
|
|
91
|
+
export function loadAutopilotConfig(projectPath = '.') {
|
|
92
|
+
const settings = readJsonFile(join(projectPath, '.claude/settings.local.json')) || {};
|
|
93
|
+
const cfg = settings.specbox?.autopilot || {};
|
|
94
|
+
const level = VALID_TIERS.includes(cfg.level) ? cfg.level : 'low';
|
|
95
|
+
return {
|
|
96
|
+
level,
|
|
97
|
+
image_budget_eur_per_feature: typeof cfg.image_budget_eur_per_feature === 'number'
|
|
98
|
+
? cfg.image_budget_eur_per_feature
|
|
99
|
+
: DEFAULT_BUDGET_EUR,
|
|
100
|
+
auto_confirm_overrides: Array.isArray(cfg.auto_confirm_overrides) ? cfg.auto_confirm_overrides : [],
|
|
101
|
+
always_ask_overrides: Array.isArray(cfg.always_ask_overrides) ? cfg.always_ask_overrides : [],
|
|
102
|
+
queue_enabled: cfg.queue_enabled === true, // off by default in v5.29.0
|
|
103
|
+
queue_auto_resolve_days: typeof cfg.queue_auto_resolve_days === 'number' ? cfg.queue_auto_resolve_days : 7,
|
|
104
|
+
raw: cfg,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ── Decision evaluation ──────────────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Evaluate a single decision against the active autopilot policy.
|
|
112
|
+
*
|
|
113
|
+
* @param {string} decisionKey - Key from DECISION_KEYS.
|
|
114
|
+
* @param {object} context - Optional signals: { score, costEur, hasAppPrd, hasAppSpec, isUnique, projectPath,
|
|
115
|
+
* defaultOption }. With `autopilot.queue_enabled` and a `defaultOption`, a decision that would be asked
|
|
116
|
+
* is queued instead (UC-9902): the session goes on with the default and the person decides later from
|
|
117
|
+
* the panel or the phone.
|
|
118
|
+
* @returns {object} { autoConfirm, action: 'auto'|'ask'|'block'|'queue', reason, decisionKey, level }.
|
|
119
|
+
*/
|
|
120
|
+
export function evaluateDecision(decisionKey, context = {}) {
|
|
121
|
+
const def = DECISION_KEYS[decisionKey];
|
|
122
|
+
if (!def) {
|
|
123
|
+
return { autoConfirm: false, action: 'ask', reason: 'unknown_decision_key', decisionKey, level: null };
|
|
124
|
+
}
|
|
125
|
+
const config = loadAutopilotConfig(context.projectPath);
|
|
126
|
+
const level = config.level;
|
|
127
|
+
|
|
128
|
+
// 1) always_ask_overrides take precedence (user pinned).
|
|
129
|
+
if (config.always_ask_overrides.includes(decisionKey)) {
|
|
130
|
+
return { autoConfirm: false, action: 'ask', reason: 'user_override_always_ask', decisionKey, level };
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// 2) Inviolable rules cannot be auto-confirmed by any tier or override.
|
|
134
|
+
if (def.inviolable) {
|
|
135
|
+
const action = def.tiers[level] || 'ask';
|
|
136
|
+
return { autoConfirm: false, action, reason: 'inviolable_rule', decisionKey, level };
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// 3) auto_confirm_overrides: user explicitly opted-in for this key.
|
|
140
|
+
if (config.auto_confirm_overrides.includes(decisionKey)) {
|
|
141
|
+
return { autoConfirm: true, action: 'auto', reason: 'user_override_auto_confirm', decisionKey, level };
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 4) Tier rule.
|
|
145
|
+
const rule = def.tiers[level] || 'ask';
|
|
146
|
+
const decision = applyRule(rule, def, context, level);
|
|
147
|
+
|
|
148
|
+
// 5) UC-9902: con la cola activa, lo que se preguntaría se aplaza con su opción por defecto.
|
|
149
|
+
if (decision.action === 'ask' && config.queue_enabled && context.defaultOption && !NOT_QUEUEABLE.has(decisionKey)) {
|
|
150
|
+
return { autoConfirm: true, action: 'queue', reason: 'queued_with_default', decisionKey, level };
|
|
151
|
+
}
|
|
152
|
+
return { ...decision, decisionKey, level };
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function applyRule(rule, def, ctx, level) {
|
|
156
|
+
switch (rule) {
|
|
157
|
+
case 'auto':
|
|
158
|
+
return { autoConfirm: true, action: 'auto', reason: 'tier_default' };
|
|
159
|
+
case 'ask':
|
|
160
|
+
return { autoConfirm: false, action: 'ask', reason: 'tier_default' };
|
|
161
|
+
case 'block':
|
|
162
|
+
return { autoConfirm: false, action: 'block', reason: 'destructive_blocked' };
|
|
163
|
+
case 'auto_if_score_high':
|
|
164
|
+
case 'auto_if_score_low': {
|
|
165
|
+
const threshold = def.scoreThreshold?.[level];
|
|
166
|
+
if (typeof ctx.score !== 'number' || typeof threshold !== 'number') {
|
|
167
|
+
return { autoConfirm: false, action: 'ask', reason: 'missing_score_or_threshold' };
|
|
168
|
+
}
|
|
169
|
+
return ctx.score >= threshold
|
|
170
|
+
? { autoConfirm: true, action: 'auto', reason: `score_${ctx.score}_meets_${threshold}` }
|
|
171
|
+
: { autoConfirm: false, action: 'ask', reason: `score_${ctx.score}_below_${threshold}` };
|
|
172
|
+
}
|
|
173
|
+
case 'auto_if_under_budget': {
|
|
174
|
+
const config = loadAutopilotConfig(ctx.projectPath);
|
|
175
|
+
const budget = config.image_budget_eur_per_feature;
|
|
176
|
+
if (typeof ctx.costEur !== 'number') {
|
|
177
|
+
return { autoConfirm: false, action: 'ask', reason: 'missing_cost' };
|
|
178
|
+
}
|
|
179
|
+
return ctx.costEur <= budget
|
|
180
|
+
? { autoConfirm: true, action: 'auto', reason: `cost_${ctx.costEur}_within_budget_${budget}` }
|
|
181
|
+
: { autoConfirm: false, action: 'ask', reason: `cost_${ctx.costEur}_over_budget_${budget}` };
|
|
182
|
+
}
|
|
183
|
+
case 'auto_if_app_prd':
|
|
184
|
+
return ctx.hasAppPrd
|
|
185
|
+
? { autoConfirm: true, action: 'auto', reason: 'app_prd_provides_value' }
|
|
186
|
+
: { autoConfirm: false, action: 'ask', reason: 'no_app_prd_to_inherit_from' };
|
|
187
|
+
case 'auto_if_app_spec':
|
|
188
|
+
return ctx.hasAppSpec
|
|
189
|
+
? { autoConfirm: true, action: 'auto', reason: 'app_spec_provides_value' }
|
|
190
|
+
: { autoConfirm: false, action: 'ask', reason: 'no_app_spec_to_inherit_from' };
|
|
191
|
+
case 'auto_if_unique':
|
|
192
|
+
return ctx.isUnique
|
|
193
|
+
? { autoConfirm: true, action: 'auto', reason: 'unique_match' }
|
|
194
|
+
: { autoConfirm: false, action: 'ask', reason: 'ambiguous_match' };
|
|
195
|
+
case 'auto_freeform_default':
|
|
196
|
+
// backend_selection: default to freeform when no other backend is configured.
|
|
197
|
+
return { autoConfirm: true, action: 'auto', reason: 'freeform_default_v5_29' };
|
|
198
|
+
default:
|
|
199
|
+
return { autoConfirm: false, action: 'ask', reason: `unknown_rule_${rule}` };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ── Audit logging ────────────────────────────────────────────────────
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Append an autopilot decision to `.quality/autopilot_decisions.jsonl`.
|
|
207
|
+
* Every auto-confirmed decision MUST log here so the user can audit and
|
|
208
|
+
* `/queue review --recent N` can revert recent automatic choices.
|
|
209
|
+
*
|
|
210
|
+
* @param {object} decision - Result from evaluateDecision().
|
|
211
|
+
* @param {object} extra - { feature, value, ref, projectPath }.
|
|
212
|
+
*/
|
|
213
|
+
export function logAutoDecision(decision, extra = {}) {
|
|
214
|
+
const projectPath = extra.projectPath || '.';
|
|
215
|
+
const logPath = join(projectPath, '.quality', 'autopilot_decisions.jsonl');
|
|
216
|
+
const entry = {
|
|
217
|
+
ts: new Date().toISOString(),
|
|
218
|
+
decision_key: decision.decisionKey,
|
|
219
|
+
level: decision.level,
|
|
220
|
+
action: decision.action,
|
|
221
|
+
auto_confirm: decision.autoConfirm,
|
|
222
|
+
reason: decision.reason,
|
|
223
|
+
feature: extra.feature || null,
|
|
224
|
+
value: extra.value !== undefined ? extra.value : null,
|
|
225
|
+
ref: extra.ref || null,
|
|
226
|
+
};
|
|
227
|
+
appendLine(logPath, JSON.stringify(entry));
|
|
228
|
+
return entry;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Convenience: evaluate + log in one call. Returns the decision unchanged.
|
|
233
|
+
*/
|
|
234
|
+
export function evaluateAndLog(decisionKey, context = {}, extra = {}) {
|
|
235
|
+
const decision = evaluateDecision(decisionKey, context);
|
|
236
|
+
if (decision.autoConfirm) {
|
|
237
|
+
logAutoDecision(decision, { ...extra, projectPath: context.projectPath });
|
|
238
|
+
}
|
|
239
|
+
return decision;
|
|
240
|
+
}
|