@mgiles/perk 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension/doors/address.ts +11 -0
- package/extension/doors/dreamWaveTools.ts +29 -15
- package/extension/doors/land.ts +6 -0
- package/extension/doors/learn.ts +16 -3
- package/extension/doors/lifecycleGates.ts +36 -1
- package/extension/doors/objectiveStack.ts +423 -23
- package/extension/doors/plannotatorHandoff.ts +80 -8
- package/extension/doors/prReview.ts +2 -1
- package/extension/doors/prReviewBrowser.ts +75 -27
- package/extension/doors/ready.ts +209 -17
- package/extension/doors/reviewWaveTools.ts +24 -3
- package/extension/doors/stackReviewBrowser.ts +573 -0
- package/extension/doors/submit.ts +36 -10
- package/extension/doors/submitPrReview.ts +116 -19
- package/extension/factories/objectivePlan.ts +12 -6
- package/extension/factories/objectiveSave.ts +5 -2
- package/extension/index.ts +26 -1
- package/extension/substrate/config.ts +4 -2
- package/extension/substrate/paths.ts +2 -7
- package/extension/substrate/resolverLease.ts +363 -0
- package/extension/substrate/toolGating.ts +16 -0
- package/extension/substrate/workflowState.ts +13 -3
- package/extension/waves/adversarialReviewWave.ts +16 -2
- package/package.json +1 -1
- package/prompts/_fixtures/live.yaml +63 -0
- package/prompts/contexts/adapters/tombell-plan.md +4 -0
- package/prompts/contexts/plan-authoring.md +6 -5
- package/prompts/stages/conflict-resolution-continuation.md +6 -0
- package/prompts/stages/conflict-resolution.md +1 -1
- package/prompts/stages/objective-author/adopt.md +1 -1
- package/prompts/stages/objective-author/file.md +1 -1
- package/prompts/stages/objective-author/seed.md +1 -1
- package/prompts/stages/objective-reconcile-ready.md +7 -0
- package/prompts/stages/objective-sync.md +1 -1
- package/prompts/stages/stack-review/cold.md +1 -0
- package/prompts/stages/stack-review-browser/stack.md +23 -0
- package/shared/README.md +0 -3
- package/shared/bindings.yaml +3 -0
- package/shared/contracts.md +2010 -1753
- package/shared/registry.yaml +16 -1
- package/shared/schemas/outputs/objective-stack-status.schema.json +172 -1
- package/shared/schemas/outputs/pr-ready.schema.json +110 -2
- package/shared/contracts-history.md +0 -605
package/shared/registry.yaml
CHANGED
|
@@ -124,7 +124,7 @@ stages:
|
|
|
124
124
|
- id: objective-plan
|
|
125
125
|
summary: Select the next objective node and author a bounded plan (read-only).
|
|
126
126
|
mode: read-only
|
|
127
|
-
worktree: none # interactive planning, like plan — no branch yet
|
|
127
|
+
worktree: none # interactive planning, like plan — no branch yet; the cold door overrides to a transient reuse stage for a stacked child layer with a live predecessor branch (§8.46)
|
|
128
128
|
doors: { warm: true, cold_local: true, cold_remote: false } # interactive local exploration
|
|
129
129
|
run_id: { warm: keep, cold_local: mint, cold_remote: mint }
|
|
130
130
|
command: objective plan # P2.T10: dedicated cold door (perk objective plan) + /objective-plan
|
|
@@ -250,3 +250,18 @@ stages:
|
|
|
250
250
|
writes: [session.workflow-state, cache.scratch] # the claim append; run_audit_wave writes <bundle>/verdicts.json under scratch
|
|
251
251
|
predecessors: [] # a deliberately isolated node — the dev-only audit component
|
|
252
252
|
successors: []
|
|
253
|
+
|
|
254
|
+
- id: stack-review
|
|
255
|
+
summary: Review a stacked PR train in the plannotator browser with judgment-routed per-PR posting.
|
|
256
|
+
mode: read-write # deliberate parity with the warm /stack-review-browser door — the
|
|
257
|
+
# human is present and nothing auto-posts (contracts.md §8.4)
|
|
258
|
+
worktree: none # runs in the invoking checkout; the review checkout is the
|
|
259
|
+
# detached review-<top> worktree the cold door materialized
|
|
260
|
+
doors: { warm: false, cold_local: true, cold_remote: false } # interactive browser flow — local-only by design
|
|
261
|
+
run_id: { warm: keep, cold_local: mint, cold_remote: mint }
|
|
262
|
+
command: objective stack review # label — the dedicated cold door under the objective stack group
|
|
263
|
+
requires: []
|
|
264
|
+
reads: []
|
|
265
|
+
writes: [github.pr, github.review-threads, session.workflow-state, cache.scratch] # per-PR review posting via submit_pr_review; the claim append; scratch
|
|
266
|
+
predecessors: [] # a deliberately isolated node — the stacked-review component
|
|
267
|
+
successors: []
|
|
@@ -123,6 +123,129 @@
|
|
|
123
123
|
"title": "FindingOut",
|
|
124
124
|
"type": "object"
|
|
125
125
|
},
|
|
126
|
+
"GateBlockerOut": {
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"description": "One planning-gate blocker row (contracts.md \u00a78.46) \u2014 the shared machine\ndiscriminator every gate-carrying envelope serializes.\n\n``kind`` is ``\"technical\"`` (a train readiness veto \u2014 ``code``/``message`` verbatim, or\nthe gate-owned defensive ``dependency_not_ready``) or ``\"handoff\"`` (a handoff-blocked\ndirect dependency \u2014 fields-only, no prose: consumers read the pinned fields). Handoff\nrows derive from a verified-PUBLISHED layer, so ``plan``/``pr``/``remediation`` are\nalways populated there (the nullable wire types exist for the technical rows).",
|
|
129
|
+
"properties": {
|
|
130
|
+
"kind": {
|
|
131
|
+
"title": "Kind",
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"code": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "null"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"title": "Code"
|
|
144
|
+
},
|
|
145
|
+
"message": {
|
|
146
|
+
"anyOf": [
|
|
147
|
+
{
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "null"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"title": "Message"
|
|
155
|
+
},
|
|
156
|
+
"dependency_node_id": {
|
|
157
|
+
"anyOf": [
|
|
158
|
+
{
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "null"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"title": "Dependency Node Id"
|
|
166
|
+
},
|
|
167
|
+
"plan": {
|
|
168
|
+
"anyOf": [
|
|
169
|
+
{
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "null"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"title": "Plan"
|
|
177
|
+
},
|
|
178
|
+
"pr": {
|
|
179
|
+
"anyOf": [
|
|
180
|
+
{
|
|
181
|
+
"type": "integer"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"type": "null"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"title": "Pr"
|
|
188
|
+
},
|
|
189
|
+
"handoff_state": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "null"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"title": "Handoff State"
|
|
199
|
+
},
|
|
200
|
+
"stamped_head": {
|
|
201
|
+
"anyOf": [
|
|
202
|
+
{
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"type": "null"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"title": "Stamped Head"
|
|
210
|
+
},
|
|
211
|
+
"current_head": {
|
|
212
|
+
"anyOf": [
|
|
213
|
+
{
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "null"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"title": "Current Head"
|
|
221
|
+
},
|
|
222
|
+
"remediation": {
|
|
223
|
+
"anyOf": [
|
|
224
|
+
{
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"type": "null"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"title": "Remediation"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"required": [
|
|
235
|
+
"kind",
|
|
236
|
+
"code",
|
|
237
|
+
"message",
|
|
238
|
+
"dependency_node_id",
|
|
239
|
+
"plan",
|
|
240
|
+
"pr",
|
|
241
|
+
"handoff_state",
|
|
242
|
+
"stamped_head",
|
|
243
|
+
"current_head",
|
|
244
|
+
"remediation"
|
|
245
|
+
],
|
|
246
|
+
"title": "GateBlockerOut",
|
|
247
|
+
"type": "object"
|
|
248
|
+
},
|
|
126
249
|
"LayerOut": {
|
|
127
250
|
"additionalProperties": false,
|
|
128
251
|
"properties": {
|
|
@@ -245,6 +368,10 @@
|
|
|
245
368
|
}
|
|
246
369
|
],
|
|
247
370
|
"title": "Expected Pr Base"
|
|
371
|
+
},
|
|
372
|
+
"handoff": {
|
|
373
|
+
"title": "Handoff",
|
|
374
|
+
"type": "string"
|
|
248
375
|
}
|
|
249
376
|
},
|
|
250
377
|
"required": [
|
|
@@ -263,7 +390,8 @@
|
|
|
263
390
|
"published_head_sha",
|
|
264
391
|
"observed_remote_head_sha",
|
|
265
392
|
"observed_pr_base",
|
|
266
|
-
"expected_pr_base"
|
|
393
|
+
"expected_pr_base",
|
|
394
|
+
"handoff"
|
|
267
395
|
],
|
|
268
396
|
"title": "LayerOut",
|
|
269
397
|
"type": "object"
|
|
@@ -406,6 +534,41 @@
|
|
|
406
534
|
"title": "OrphanedResidueOut",
|
|
407
535
|
"type": "object"
|
|
408
536
|
},
|
|
537
|
+
"PlanningGateOut": {
|
|
538
|
+
"additionalProperties": false,
|
|
539
|
+
"description": "The composed planning-gate block (contracts.md \u00a78.46): the evaluated candidate\n(``None`` when no candidate exists), the technical-AND-handoff verdict for\nplanning/fresh starts, and the blocker rows.",
|
|
540
|
+
"properties": {
|
|
541
|
+
"node_id": {
|
|
542
|
+
"anyOf": [
|
|
543
|
+
{
|
|
544
|
+
"type": "string"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"type": "null"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"title": "Node Id"
|
|
551
|
+
},
|
|
552
|
+
"ready": {
|
|
553
|
+
"title": "Ready",
|
|
554
|
+
"type": "boolean"
|
|
555
|
+
},
|
|
556
|
+
"blockers": {
|
|
557
|
+
"items": {
|
|
558
|
+
"$ref": "#/$defs/GateBlockerOut"
|
|
559
|
+
},
|
|
560
|
+
"title": "Blockers",
|
|
561
|
+
"type": "array"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"required": [
|
|
565
|
+
"node_id",
|
|
566
|
+
"ready",
|
|
567
|
+
"blockers"
|
|
568
|
+
],
|
|
569
|
+
"title": "PlanningGateOut",
|
|
570
|
+
"type": "object"
|
|
571
|
+
},
|
|
409
572
|
"TrainOut": {
|
|
410
573
|
"additionalProperties": false,
|
|
411
574
|
"properties": {
|
|
@@ -477,6 +640,14 @@
|
|
|
477
640
|
"default": 0,
|
|
478
641
|
"title": "Landed Prefix Len",
|
|
479
642
|
"type": "integer"
|
|
643
|
+
},
|
|
644
|
+
"planning_gate": {
|
|
645
|
+
"$ref": "#/$defs/PlanningGateOut",
|
|
646
|
+
"default": {
|
|
647
|
+
"node_id": null,
|
|
648
|
+
"ready": false,
|
|
649
|
+
"blockers": []
|
|
650
|
+
}
|
|
480
651
|
}
|
|
481
652
|
},
|
|
482
653
|
"required": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"additionalProperties": false,
|
|
25
|
-
"description": "The ``--json`` serialization boundary of :class:`PrReadyResult` (order load-bearing).",
|
|
25
|
+
"description": "The ``--json`` serialization boundary of :class:`PrReadyResult` (order load-bearing \u2014\nthe nine continuation fields are tail-additive).\n\nNull semantics: dry-run \u2192 all nine continuation fields null; incremental \u2192\n``stacked=false``, rest null; stacked success \u2192 all populated (``reconcile_notice`` /\n``reconcile_retry`` are CLI-composed presentation: the ready-time reconcile pass was not\nlaunched \u2014 the worker never launches \u2014 plus the copyable re-run gesture; ``plan`` /\n``parent_checkpoint`` are the continuation evidence consumers compose the pinned diff\nrange from, contracts.md \u00a78.66).",
|
|
26
26
|
"properties": {
|
|
27
27
|
"success": {
|
|
28
28
|
"title": "Success",
|
|
@@ -60,6 +60,105 @@
|
|
|
60
60
|
"dry_run": {
|
|
61
61
|
"title": "Dry Run",
|
|
62
62
|
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
"stacked": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"type": "boolean"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "null"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"title": "Stacked"
|
|
74
|
+
},
|
|
75
|
+
"objective": {
|
|
76
|
+
"anyOf": [
|
|
77
|
+
{
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "null"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"title": "Objective"
|
|
85
|
+
},
|
|
86
|
+
"node": {
|
|
87
|
+
"anyOf": [
|
|
88
|
+
{
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "null"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"title": "Node"
|
|
96
|
+
},
|
|
97
|
+
"stamped_head": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "null"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"title": "Stamped Head"
|
|
107
|
+
},
|
|
108
|
+
"stamp_advanced": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "null"
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
"title": "Stamp Advanced"
|
|
118
|
+
},
|
|
119
|
+
"reconcile_notice": {
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "null"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"title": "Reconcile Notice"
|
|
129
|
+
},
|
|
130
|
+
"reconcile_retry": {
|
|
131
|
+
"anyOf": [
|
|
132
|
+
{
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "null"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"title": "Reconcile Retry"
|
|
140
|
+
},
|
|
141
|
+
"plan": {
|
|
142
|
+
"anyOf": [
|
|
143
|
+
{
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "null"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"title": "Plan"
|
|
151
|
+
},
|
|
152
|
+
"parent_checkpoint": {
|
|
153
|
+
"anyOf": [
|
|
154
|
+
{
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "null"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"title": "Parent Checkpoint"
|
|
63
162
|
}
|
|
64
163
|
},
|
|
65
164
|
"required": [
|
|
@@ -68,7 +167,16 @@
|
|
|
68
167
|
"message",
|
|
69
168
|
"pr",
|
|
70
169
|
"was_draft",
|
|
71
|
-
"dry_run"
|
|
170
|
+
"dry_run",
|
|
171
|
+
"stacked",
|
|
172
|
+
"objective",
|
|
173
|
+
"node",
|
|
174
|
+
"stamped_head",
|
|
175
|
+
"stamp_advanced",
|
|
176
|
+
"reconcile_notice",
|
|
177
|
+
"reconcile_retry",
|
|
178
|
+
"plan",
|
|
179
|
+
"parent_checkpoint"
|
|
72
180
|
],
|
|
73
181
|
"title": "PrReadyOut",
|
|
74
182
|
"type": "object"
|