@mgiles/perk 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -57
- package/extension/adapters/planAdapterPlannotator.ts +27 -41
- package/extension/adapters/planAdapterTombell.ts +15 -28
- package/extension/adapters/todoAdapterJuicesharp.ts +10 -13
- package/extension/checkpoints/checkpoints.ts +21 -13
- package/extension/doors/address.ts +6 -5
- package/extension/doors/askUser.ts +12 -8
- package/extension/doors/ciExecutor.ts +23 -15
- package/extension/doors/hunkHandoff.ts +202 -0
- package/extension/doors/land.ts +33 -10
- package/extension/doors/learn.ts +240 -34
- package/extension/doors/learnFactory.ts +144 -0
- package/extension/doors/lifecycleGates.ts +2 -1
- package/extension/doors/plannotatorHandoff.ts +509 -0
- package/extension/doors/prReview.ts +22 -37
- package/extension/doors/prReviewBrowser.ts +341 -0
- package/extension/doors/prReviewTerminal.ts +267 -0
- package/extension/doors/ready.ts +2 -1
- package/extension/doors/selfcheck.ts +240 -6
- package/extension/doors/submit.ts +37 -19
- package/extension/doors/submitPrReview.ts +408 -0
- package/extension/factories/implementHere.ts +116 -0
- package/extension/factories/objective.ts +17 -6
- package/extension/factories/objectiveAuthor.ts +15 -32
- package/extension/factories/objectiveDraft.ts +1 -1
- package/extension/factories/objectivePlan.ts +16 -34
- package/extension/factories/objectiveSave.ts +7 -17
- package/extension/factories/planMode.ts +24 -38
- package/extension/factories/planReview.ts +291 -177
- package/extension/factories/planSave.ts +23 -8
- package/extension/index.ts +117 -20
- package/extension/substrate/bindingDelivery.ts +32 -10
- package/extension/substrate/bindings.ts +4 -2
- package/extension/substrate/cache.ts +36 -9
- package/extension/substrate/clipboard.ts +81 -0
- package/extension/substrate/command.ts +25 -0
- package/extension/substrate/config.ts +98 -76
- package/extension/substrate/consoleCapture.ts +90 -0
- package/extension/substrate/git.ts +77 -0
- package/extension/substrate/miniJinja.ts +480 -0
- package/extension/substrate/paths.ts +38 -0
- package/extension/substrate/prompts.ts +15 -24
- package/extension/substrate/providers.ts +62 -8
- package/extension/substrate/sessionData.ts +1 -1
- package/extension/substrate/sessionPointers.ts +184 -0
- package/extension/substrate/structuredOutput.ts +3 -1
- package/extension/substrate/terminalLaunch.ts +178 -0
- package/extension/substrate/toolGating.ts +332 -73
- package/extension/substrate/toolParams.ts +7 -0
- package/extension/substrate/workflowState.ts +54 -2
- package/extension/surfaces/footerProvider.ts +8 -4
- package/extension/surfaces/surfaces.ts +338 -13
- package/extension/vendor/btw/btw.ts +10 -0
- package/extension/worker/readOnlySession.ts +19 -6
- package/extension/worker/worker.ts +187 -31
- package/extension/workerMain.ts +14 -13
- package/package.json +3 -7
- package/prompts/README.md +56 -5
- package/prompts/_fixtures/cases.yaml +52 -131
- package/prompts/_fixtures/golden/cond_elif-a.txt +3 -0
- package/prompts/_fixtures/golden/cond_elif-b.txt +3 -0
- package/prompts/_fixtures/golden/cond_elif-c.txt +3 -0
- package/prompts/_fixtures/golden/cond_if-false.txt +3 -0
- package/prompts/_fixtures/golden/cond_if-true.txt +3 -0
- package/prompts/_fixtures/golden/cond_ops-1.txt +3 -0
- package/prompts/_fixtures/golden/cond_ops-2.txt +3 -0
- package/prompts/_fixtures/golden/no_trailing_nl.txt +2 -0
- package/prompts/_fixtures/golden/trailing_nl.txt +2 -0
- package/prompts/_fixtures/golden/trim_block.txt +3 -0
- package/prompts/_fixtures/golden/trim_inline.txt +1 -0
- package/prompts/_fixtures/live.yaml +396 -0
- package/prompts/_fixtures/templates/cond_elif.md +9 -0
- package/prompts/_fixtures/templates/cond_if.md +7 -0
- package/prompts/_fixtures/templates/cond_ops.md +3 -0
- package/prompts/_fixtures/templates/no_trailing_nl.md +2 -0
- package/prompts/_fixtures/templates/trailing_nl.md +2 -0
- package/prompts/_fixtures/templates/trim_block.md +5 -0
- package/prompts/_fixtures/templates/trim_inline.md +1 -0
- package/prompts/contexts/adapters/juicesharp-todo.md +7 -0
- package/prompts/contexts/adapters/plannotator-objective.md +7 -0
- package/prompts/contexts/adapters/plannotator-plan.md +6 -0
- package/prompts/contexts/adapters/tombell-plan.md +17 -0
- package/prompts/contexts/objective-authoring.md +20 -0
- package/prompts/contexts/plan-authoring.md +24 -0
- package/prompts/contexts/read-only.md +10 -0
- package/prompts/stages/conflict-resolution.md +4 -0
- package/prompts/stages/learn-code.md +8 -0
- package/prompts/stages/learn-docs.md +7 -6
- package/prompts/stages/learn-orchestrate.md +6 -0
- package/prompts/stages/learn.md +1 -1
- package/prompts/stages/objective-author/adopt.md +12 -0
- package/prompts/stages/objective-author/file.md +9 -0
- package/prompts/stages/objective-author/seed.md +9 -0
- package/prompts/stages/objective-plan/guidance.md +1 -1
- package/prompts/stages/objective-plan/seed.md +3 -2
- package/prompts/stages/objective-reconcile.md +7 -0
- package/prompts/stages/objective-replan.md +14 -0
- package/prompts/stages/objective-save.md +9 -0
- package/prompts/stages/plan-from/adopt.md +10 -0
- package/prompts/stages/plan-from/file.md +9 -0
- package/prompts/stages/pr-review-browser/active.md +11 -0
- package/prompts/stages/pr-review-browser/foreign.md +11 -0
- package/prompts/stages/pr-review-terminal/active.md +12 -0
- package/prompts/stages/pr-review-terminal/foreign.md +13 -0
- package/prompts/stages/pr-review-terminal/local.md +4 -0
- package/prompts/stages/pr-review.md +6 -0
- package/prompts/stages/replan.md +13 -0
- package/prompts/stages/skills/create-from.md +15 -0
- package/prompts/stages/skills/create.md +9 -0
- package/prompts/stages/skills/refine.md +9 -0
- package/shared/README.md +23 -13
- package/shared/bindings.yaml +22 -2
- package/shared/contracts-history.md +191 -0
- package/shared/contracts.md +2258 -1638
- package/shared/providers.yaml +8 -1
- package/shared/registry.yaml +10 -11
- package/shared/schemas/contracts/bindings.schema.json +38 -0
- package/shared/schemas/contracts/providers.schema.json +89 -0
- package/shared/schemas/contracts/registry.schema.json +98 -0
- package/shared/schemas/inputs/handoff-arg.schema.json +6 -0
- package/shared/schemas/inputs/resolve-threads-batch.schema.json +37 -0
- package/shared/schemas/inputs/review-post-batch.schema.json +84 -0
- package/shared/schemas/inputs/review-submit-batch.schema.json +66 -0
- package/shared/schemas/inputs/structured-roadmap-node.schema.json +102 -0
- package/shared/schemas/outputs/doctor-report.schema.json +236 -0
- package/shared/schemas/outputs/init-report.schema.json +419 -0
- package/shared/schemas/outputs/learn-capture.schema.json +90 -0
- package/shared/schemas/outputs/learn-skip.schema.json +59 -0
- package/shared/schemas/outputs/plan-save.schema.json +209 -0
- package/shared/schemas/outputs/pr-feedback.schema.json +334 -0
- package/shared/schemas/outputs/pr-land.schema.json +187 -0
- package/shared/schemas/outputs/pr-ready.schema.json +75 -0
- package/shared/schemas/outputs/pr-review-checkout.schema.json +69 -0
- package/shared/schemas/outputs/pr-review-cleanup.schema.json +54 -0
- package/shared/schemas/outputs/pr-review-context.schema.json +86 -0
- package/shared/schemas/outputs/pr-review-submit.schema.json +64 -0
- package/shared/schemas/outputs/pr-submit.schema.json +147 -0
- package/extension/doors/learnDocs.ts +0 -99
- package/prompts/_fixtures/golden/address-action-model.txt +0 -10
- package/prompts/_fixtures/golden/address-action.txt +0 -10
- package/prompts/_fixtures/golden/address-preview-model.txt +0 -6
- package/prompts/_fixtures/golden/address-preview.txt +0 -6
- package/prompts/_fixtures/golden/implement-github.txt +0 -8
- package/prompts/_fixtures/golden/learn-docs.txt +0 -8
- package/prompts/_fixtures/golden/learn-github.txt +0 -11
- package/prompts/_fixtures/golden/learn-linear.txt +0 -11
- package/prompts/_fixtures/golden/learn-no-ref.txt +0 -8
- package/prompts/_fixtures/golden/learn-other.txt +0 -8
- package/prompts/_fixtures/golden/objective-plan-guidance-linear.txt +0 -8
- package/prompts/_fixtures/golden/objective-plan-guidance.txt +0 -8
- package/prompts/_fixtures/golden/objective-plan-seed-linear.txt +0 -20
- package/prompts/_fixtures/golden/objective-plan-seed.txt +0 -15
- package/prompts/_fixtures/golden/objective-read-linear-nourl.txt +0 -1
- package/prompts/_fixtures/golden/objective-read-linear.txt +0 -1
- package/prompts/_fixtures/golden/plan-read-github.txt +0 -1
- package/prompts/_fixtures/golden/plan-read-linear.txt +0 -1
- package/prompts/_fixtures/golden/plan-read-other.txt +0 -1
package/shared/providers.yaml
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
# id — the stable provider id. NOT the cache.plan-ref `provider` string:
|
|
17
17
|
# that field is the ISSUE BACKEND (the stamped `backend_id`, e.g.
|
|
18
18
|
# "github"), not the seam id — see contracts.md §8.10 / §8.21.
|
|
19
|
-
# seam — `plan` | `todo` | `askuser` | `footer` | `web` (the five seams
|
|
19
|
+
# seam — `plan` | `todo` | `askuser` | `footer` | `web` (the five seams; see
|
|
20
|
+
# pluggability-taxonomy.md for the scope fence).
|
|
20
21
|
# package — the foreign Pi package spec added to .pi/settings.json `packages`
|
|
21
22
|
# (e.g. "npm:@tombell/pi-plan"); `null` for perk's own bundled reference
|
|
22
23
|
# provider (nothing to add — perk produces the contract natively). NOT
|
|
@@ -95,6 +96,12 @@
|
|
|
95
96
|
# is pi-web-access-specific (it depends on `fetch_content`'s GitHub-clone path) and is accepted as
|
|
96
97
|
# lost under a foreign web selection. Fail-safe: any config-read error resolves to `pi-web-access`,
|
|
97
98
|
# keeping today's behavior exactly.
|
|
99
|
+
#
|
|
100
|
+
# There is NO review seam: the two surface-named review doors (`/pr-review-terminal` — the hunk
|
|
101
|
+
# terminal TUI; `/pr-review-browser` — the plannotator browser UI) are the selection (the command
|
|
102
|
+
# IS the surface pick). The hunk CLI converges unconditionally (init/doctor's best-effort
|
|
103
|
+
# `review-cli` install/verify); the plannotator package rides the plan seam's `plannotator-plan`
|
|
104
|
+
# entry.
|
|
98
105
|
|
|
99
106
|
schema_version: 1
|
|
100
107
|
|
package/shared/registry.yaml
CHANGED
|
@@ -27,7 +27,7 @@ state_keys:
|
|
|
27
27
|
- comments # discussion comments
|
|
28
28
|
- review-threads # review threads (distinct API from comments)
|
|
29
29
|
- learn # the perk:learn knowledge-capture issue (P2.T8b)
|
|
30
|
-
# Tier 2 · .
|
|
30
|
+
# Tier 2 · .perk/workflow/ — the local cache (see contracts.md §8.1).
|
|
31
31
|
cache:
|
|
32
32
|
- plan # materialized plan body cache
|
|
33
33
|
- plan-ref # provider-agnostic plan->branch ref (see contracts.md §8.4)
|
|
@@ -52,12 +52,11 @@ state_keys:
|
|
|
52
52
|
# actual dedicated cold-door routing lives in code via `perk/cli/stages.py` `DEDICATED_STAGES`
|
|
53
53
|
# (the generic launcher generator skips those ids). The field documents intent; it does not route.
|
|
54
54
|
# `doors.cold_remote` records which stages a remote runner may run (cli-vs-pi §4.5) —
|
|
55
|
-
# a
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
# Phase 3 *drives* it. Revisable in Phase 3.
|
|
55
|
+
# a settled design decision, not merely "not built yet". It is `true` exactly on the
|
|
56
|
+
# bounded agentic stages (`implement`, `address`), where the goal is already pinned by
|
|
57
|
+
# a plan or by reviewer feedback. The interactive/exploratory stages (planning above
|
|
58
|
+
# all) and the quick deterministic human-gate ops (`submit`/`land`/`learn`) are
|
|
59
|
+
# local-only by design — review, merge, and judgment capture stay where a human is.
|
|
61
60
|
# ---------------------------------------------------------------------------
|
|
62
61
|
stages:
|
|
63
62
|
- id: objective-author
|
|
@@ -129,7 +128,7 @@ stages:
|
|
|
129
128
|
summary: Do the work on a branch (requires fresh context; cold-only).
|
|
130
129
|
mode: read-write
|
|
131
130
|
worktree: create # first stage that needs a branch/worktree (folds in erk's `prepare`)
|
|
132
|
-
doors: { warm: false, cold_local: true, cold_remote: true } #
|
|
131
|
+
doors: { warm: false, cold_local: true, cold_remote: true } # bounded agentic stage — remotely runnable
|
|
133
132
|
run_id: { warm: keep, cold_local: mint, cold_remote: mint }
|
|
134
133
|
command: implement
|
|
135
134
|
requires: [cache.plan-ref] # T4: cold door derives plan-<pr_id> from the active ref
|
|
@@ -155,7 +154,7 @@ stages:
|
|
|
155
154
|
summary: Classify PR review feedback (isolated child) and resolve the threads.
|
|
156
155
|
mode: read-write
|
|
157
156
|
worktree: reuse
|
|
158
|
-
doors: { warm: true, cold_local: true, cold_remote: true } #
|
|
157
|
+
doors: { warm: true, cold_local: true, cold_remote: true } # bounded agentic stage — remotely runnable
|
|
159
158
|
run_id: { warm: keep, cold_local: mint, cold_remote: mint }
|
|
160
159
|
command: pr address
|
|
161
160
|
# P2.T7: a spawned read-only child (borrowed pi-subagents) fetches + classifies feedback;
|
|
@@ -175,7 +174,7 @@ stages:
|
|
|
175
174
|
command: pr land
|
|
176
175
|
requires: [github.pr] # T5b: the PR to merge must exist
|
|
177
176
|
reads: [cache.plan-ref, github.pr, github.objective] # T5b ref->branch->PR; T11a node lookup
|
|
178
|
-
writes: [github.pr, cache.markers, github.objective] # T5b merge+marker; T11a mechanical node-done
|
|
177
|
+
writes: [github.pr, cache.markers, github.objective, github.plan] # T5b merge+marker; T11a mechanical node-done; §8.36 learn_state header stamp
|
|
179
178
|
predecessors: [address]
|
|
180
179
|
successors: [learn]
|
|
181
180
|
|
|
@@ -194,6 +193,6 @@ stages:
|
|
|
194
193
|
# keys (no new gateway op) — the existing learn tool / learn capture worker still persist.
|
|
195
194
|
requires: [cache.markers] # pending-learn gates the worktree
|
|
196
195
|
reads: [cache.markers, cache.plan-ref] # was it set? + the plan ref -> issue number/run_id
|
|
197
|
-
writes: [cache.markers, github.learn, github.comments] # clear marker; create learn issue + back-link
|
|
196
|
+
writes: [cache.markers, github.learn, github.comments, github.plan] # clear marker; create learn issue + back-link; §8.36 learn_state header stamp
|
|
198
197
|
predecessors: [land]
|
|
199
198
|
successors: []
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"BindingEntry": {
|
|
4
|
+
"description": "Tolerant parse shape for one stored ``bindings.yaml`` entry.\n\nLenient base: unknown keys dropped (``extra=\"ignore\"``); absent keys default to ``\"\"`` so\n``validate()`` reports them as content findings. A present non-string scalar is a genuine\ntype error and raises (translated to ``BindingsError`` at the load boundary).",
|
|
5
|
+
"properties": {
|
|
6
|
+
"trigger": {
|
|
7
|
+
"default": "",
|
|
8
|
+
"title": "Trigger",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"skill": {
|
|
12
|
+
"default": "",
|
|
13
|
+
"title": "Skill",
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"mode": {
|
|
17
|
+
"default": "",
|
|
18
|
+
"title": "Mode",
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"title": "BindingEntry",
|
|
23
|
+
"type": "object"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"description": "Whole-file parse shape.\n\n``schema_version`` stays OUT of the model (a structural pre-check in ``load_bindings`` owns\nits byte-identical message; ``extra=\"ignore\"`` drops the key here). A non-list ``bindings:``\nraises.",
|
|
27
|
+
"properties": {
|
|
28
|
+
"bindings": {
|
|
29
|
+
"items": {
|
|
30
|
+
"$ref": "#/$defs/BindingEntry"
|
|
31
|
+
},
|
|
32
|
+
"title": "Bindings",
|
|
33
|
+
"type": "array"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"title": "BindingsFile",
|
|
37
|
+
"type": "object"
|
|
38
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"ProviderEntry": {
|
|
4
|
+
"description": "The lenient per-entry parse model at the file boundary.\n\n``id``/``seam`` are typed ``str | None`` (not ``str = \"\"``) so an explicit YAML ``null`` parses\ncleanly; the converter normalizes ``None -> \"\"`` and ``validate()`` then surfaces the\nmissing-``id`` / bad-``seam`` content findings. Other fields coerce leniently (drop unknown\nkeys, coerce ordinary scalars) per the lenient base \u2014 content findings are the *validator*'s\njob, never construction's.",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"anyOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "null"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"default": null,
|
|
16
|
+
"title": "Id"
|
|
17
|
+
},
|
|
18
|
+
"seam": {
|
|
19
|
+
"anyOf": [
|
|
20
|
+
{
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "null"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"default": null,
|
|
28
|
+
"title": "Seam"
|
|
29
|
+
},
|
|
30
|
+
"package": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "null"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"default": null,
|
|
40
|
+
"title": "Package"
|
|
41
|
+
},
|
|
42
|
+
"adapter": {
|
|
43
|
+
"anyOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "null"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"default": null,
|
|
52
|
+
"title": "Adapter"
|
|
53
|
+
},
|
|
54
|
+
"default": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"default": false,
|
|
57
|
+
"title": "Default"
|
|
58
|
+
},
|
|
59
|
+
"package_filter": {
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{
|
|
62
|
+
"additionalProperties": true,
|
|
63
|
+
"type": "object"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"default": null,
|
|
70
|
+
"title": "Package Filter"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"title": "ProviderEntry",
|
|
74
|
+
"type": "object"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"description": "The lenient whole-file parse model.\n\n``schema_version`` is deliberately NOT a field: it stays a structural pre-check in\n``load_providers`` (it must run before generic validation and raise its own message).\n``extra=\"ignore\"`` drops it (and any other top-level key) from this model.",
|
|
78
|
+
"properties": {
|
|
79
|
+
"providers": {
|
|
80
|
+
"items": {
|
|
81
|
+
"$ref": "#/$defs/ProviderEntry"
|
|
82
|
+
},
|
|
83
|
+
"title": "Providers",
|
|
84
|
+
"type": "array"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"title": "ProvidersFile",
|
|
88
|
+
"type": "object"
|
|
89
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"StageEntry": {
|
|
4
|
+
"description": "The lenient per-stage parse model at the file boundary.\n\nSame fields/defaults as the ``Stage`` domain dataclass; tolerant parsing\n(drop unknown keys, coerce ordinary scalars) per the lenient base.",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"default": "",
|
|
8
|
+
"title": "Id",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"summary": {
|
|
12
|
+
"default": "",
|
|
13
|
+
"title": "Summary",
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"mode": {
|
|
17
|
+
"default": "",
|
|
18
|
+
"title": "Mode",
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"worktree": {
|
|
22
|
+
"default": "",
|
|
23
|
+
"title": "Worktree",
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"doors": {
|
|
27
|
+
"additionalProperties": true,
|
|
28
|
+
"title": "Doors",
|
|
29
|
+
"type": "object"
|
|
30
|
+
},
|
|
31
|
+
"run_id": {
|
|
32
|
+
"additionalProperties": true,
|
|
33
|
+
"title": "Run Id",
|
|
34
|
+
"type": "object"
|
|
35
|
+
},
|
|
36
|
+
"command": {
|
|
37
|
+
"default": "",
|
|
38
|
+
"title": "Command",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"requires": {
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"title": "Requires",
|
|
46
|
+
"type": "array"
|
|
47
|
+
},
|
|
48
|
+
"reads": {
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"title": "Reads",
|
|
53
|
+
"type": "array"
|
|
54
|
+
},
|
|
55
|
+
"writes": {
|
|
56
|
+
"items": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"title": "Writes",
|
|
60
|
+
"type": "array"
|
|
61
|
+
},
|
|
62
|
+
"predecessors": {
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"title": "Predecessors",
|
|
67
|
+
"type": "array"
|
|
68
|
+
},
|
|
69
|
+
"successors": {
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
"title": "Successors",
|
|
74
|
+
"type": "array"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"title": "StageEntry",
|
|
78
|
+
"type": "object"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"description": "The lenient whole-file parse model.\n\n``schema_version`` is deliberately NOT a field: it stays a structural\npre-check in ``load_registry`` (it must run before generic validation and\nraise its own message). ``extra=\"ignore\"`` drops it (and any other top-level\nkey) from this model.",
|
|
82
|
+
"properties": {
|
|
83
|
+
"state_keys": {
|
|
84
|
+
"additionalProperties": true,
|
|
85
|
+
"title": "State Keys",
|
|
86
|
+
"type": "object"
|
|
87
|
+
},
|
|
88
|
+
"stages": {
|
|
89
|
+
"items": {
|
|
90
|
+
"$ref": "#/$defs/StageEntry"
|
|
91
|
+
},
|
|
92
|
+
"title": "Stages",
|
|
93
|
+
"type": "array"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"title": "RegistryFile",
|
|
97
|
+
"type": "object"
|
|
98
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"additionalProperties": true,
|
|
3
|
+
"description": "Minimal strict parse: the ``--handoff`` payload must be a JSON object.\n\nThe handoff is open-ended (cache ``HandoffModel`` is ``extra=\"allow\"``), so this only\nenforces the object shape (a list/scalar fails loudly with a field path).",
|
|
4
|
+
"title": "HandoffArgInput",
|
|
5
|
+
"type": "object"
|
|
6
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"ResolveThreadInput": {
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "One strict batch item (`{thread_id, comment?}`); a typo/wrong type fails loudly.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"thread_id": {
|
|
8
|
+
"title": "Thread Id",
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"comment": {
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "null"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"default": null,
|
|
21
|
+
"title": "Comment"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required": [
|
|
25
|
+
"thread_id"
|
|
26
|
+
],
|
|
27
|
+
"title": "ResolveThreadInput",
|
|
28
|
+
"type": "object"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"description": "The strict batch root: a JSON array of thread items (a non-array fails loudly).",
|
|
32
|
+
"items": {
|
|
33
|
+
"$ref": "#/$defs/ResolveThreadInput"
|
|
34
|
+
},
|
|
35
|
+
"title": "ResolveThreadsBatch",
|
|
36
|
+
"type": "array"
|
|
37
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"ReviewCommentInput": {
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "One inline review finding in the machine-authored batch (strict: a typo fails loudly).",
|
|
6
|
+
"properties": {
|
|
7
|
+
"path": {
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"title": "Path",
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"line": {
|
|
13
|
+
"title": "Line",
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"body": {
|
|
17
|
+
"minLength": 1,
|
|
18
|
+
"title": "Body",
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": [
|
|
23
|
+
"path",
|
|
24
|
+
"line",
|
|
25
|
+
"body"
|
|
26
|
+
],
|
|
27
|
+
"title": "ReviewCommentInput",
|
|
28
|
+
"type": "object"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"description": "The strict `/pr-review` batch shape (`{verdict, summary, comments?, fyi?}`).\n\n`comments`/`fyi` stay nullable so an explicit `null` is tolerated (today's behavior),\nnormalized to `[]` in conversion. `line: int` under strict rejects `bool`/`float`/`str`\n(preserving the old `isinstance(line, bool)` guard).",
|
|
33
|
+
"properties": {
|
|
34
|
+
"verdict": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"clean",
|
|
37
|
+
"actionable"
|
|
38
|
+
],
|
|
39
|
+
"title": "Verdict",
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"summary": {
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"title": "Summary",
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"comments": {
|
|
48
|
+
"anyOf": [
|
|
49
|
+
{
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "#/$defs/ReviewCommentInput"
|
|
52
|
+
},
|
|
53
|
+
"type": "array"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "null"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"default": null,
|
|
60
|
+
"title": "Comments"
|
|
61
|
+
},
|
|
62
|
+
"fyi": {
|
|
63
|
+
"anyOf": [
|
|
64
|
+
{
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"type": "array"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "null"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"default": null,
|
|
75
|
+
"title": "Fyi"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"verdict",
|
|
80
|
+
"summary"
|
|
81
|
+
],
|
|
82
|
+
"title": "ReviewBatchInput",
|
|
83
|
+
"type": "object"
|
|
84
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"ReviewSubmitCommentInput": {
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"description": "One inline comment in the machine-authored submission batch (strict: a typo fails loudly).\n\n`line` is **non-nullable** by design: unanchorable (`line: null`) findings are folded into\nthe review body upstream, during the triage curation \u2014 never submitted as inline comments.",
|
|
6
|
+
"properties": {
|
|
7
|
+
"path": {
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"title": "Path",
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"line": {
|
|
13
|
+
"title": "Line",
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"side": {
|
|
17
|
+
"default": "RIGHT",
|
|
18
|
+
"enum": [
|
|
19
|
+
"LEFT",
|
|
20
|
+
"RIGHT"
|
|
21
|
+
],
|
|
22
|
+
"title": "Side",
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"body": {
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"title": "Body",
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": [
|
|
32
|
+
"path",
|
|
33
|
+
"line",
|
|
34
|
+
"body"
|
|
35
|
+
],
|
|
36
|
+
"title": "ReviewSubmitCommentInput",
|
|
37
|
+
"type": "object"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"description": "The strict `review-submit` batch shape (`{body, comments?}` \u2014 the event rides the flag).\n\nNo `fyi` field: in-session triage color is structurally unpostable through this door\n(strict extra-forbid rejects it). `comments` stays nullable so an explicit `null` is\ntolerated, normalized to `[]` in conversion.",
|
|
42
|
+
"properties": {
|
|
43
|
+
"body": {
|
|
44
|
+
"default": "",
|
|
45
|
+
"title": "Body",
|
|
46
|
+
"type": "string"
|
|
47
|
+
},
|
|
48
|
+
"comments": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "#/$defs/ReviewSubmitCommentInput"
|
|
53
|
+
},
|
|
54
|
+
"type": "array"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "null"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"default": null,
|
|
61
|
+
"title": "Comments"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"title": "ReviewSubmitBatchInput",
|
|
65
|
+
"type": "object"
|
|
66
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$defs": {
|
|
3
|
+
"NodeStatus": {
|
|
4
|
+
"description": "A roadmap node's explicit status (open #3: never inferred from a PR column).",
|
|
5
|
+
"enum": [
|
|
6
|
+
"pending",
|
|
7
|
+
"planning",
|
|
8
|
+
"in_progress",
|
|
9
|
+
"done",
|
|
10
|
+
"blocked",
|
|
11
|
+
"skipped"
|
|
12
|
+
],
|
|
13
|
+
"title": "NodeStatus",
|
|
14
|
+
"type": "string"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"description": "Strict machine-input shape for one ``objective create --roadmap`` / ``objective_save`` node.\n\nMirrors the TS ``ROADMAP_PARAM_SCHEMA`` (``additionalProperties: false``): unknown keys fail\nloudly. ``status`` and ``depends_on`` are the only intentionally-coercing fields under the\notherwise-strict model (a raw enum value / a list of strings).",
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": {
|
|
21
|
+
"title": "Id",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"title": "Description",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"status": {
|
|
29
|
+
"$ref": "#/$defs/NodeStatus",
|
|
30
|
+
"default": "pending"
|
|
31
|
+
},
|
|
32
|
+
"slug": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"default": null,
|
|
42
|
+
"title": "Slug"
|
|
43
|
+
},
|
|
44
|
+
"pr": {
|
|
45
|
+
"anyOf": [
|
|
46
|
+
{
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "null"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"default": null,
|
|
54
|
+
"title": "Pr"
|
|
55
|
+
},
|
|
56
|
+
"depends_on": {
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"type": "array"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "null"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"default": null,
|
|
69
|
+
"title": "Depends On"
|
|
70
|
+
},
|
|
71
|
+
"comment": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "null"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"default": null,
|
|
81
|
+
"title": "Comment"
|
|
82
|
+
},
|
|
83
|
+
"adopt_issue": {
|
|
84
|
+
"anyOf": [
|
|
85
|
+
{
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "null"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"default": null,
|
|
93
|
+
"title": "Adopt Issue"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"id",
|
|
98
|
+
"description"
|
|
99
|
+
],
|
|
100
|
+
"title": "StructuredRoadmapNode",
|
|
101
|
+
"type": "object"
|
|
102
|
+
}
|