gentle-pi 2.2.0 → 2.4.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 +76 -79
- package/assets/agents/review-readability.md +0 -2
- package/assets/agents/review-reliability.md +0 -2
- package/assets/agents/review-resilience.md +0 -2
- package/assets/agents/review-risk.md +0 -2
- package/assets/agents/sdd-apply.md +5 -3
- package/assets/agents/sdd-explore.md +1 -0
- package/assets/agents/sdd-proposal.md +2 -0
- package/assets/agents/sdd-research.md +54 -0
- package/assets/agents/sdd-status.md +4 -4
- package/assets/agents/sdd-tasks.md +2 -3
- package/assets/agents/sdd-verify.md +21 -1
- package/assets/chains/sdd-full.chain.md +1 -1
- package/assets/chains/sdd-verify.chain.md +1 -1
- package/assets/orchestrator-delegation.md +56 -249
- package/assets/orchestrator-memory.md +2 -0
- package/assets/orchestrator.md +20 -40
- package/assets/sdd-orchestrator-workflow.md +30 -37
- package/assets/support/sdd-status-contract.md +7 -7
- package/contracts/review-integration/v1/schemas/transition-execution.schema.json +42 -0
- package/contracts/review-integration/v2/schemas/last-event-closure.schema.json +66 -0
- package/contracts/review-integration/v2/schemas/opencode-provider-role.schema.json +14 -0
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -7
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/README.md +10 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/manifest.json +74 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/orchestration/pi.md +53 -0
- package/contracts/review-provider-contract-mirror/v1.2.0/bundle/schemas/targeted-validator.schema.json +1 -0
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/generated/provider-capabilities.baseline.json +9 -2
- package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/generated/provider-roles.baseline.json +2 -2
- package/docs/native-authority-architecture.md +9 -11
- package/docs/review-integration.md +27 -373
- package/extensions/ask-user-choice.ts +151 -0
- package/extensions/gentle-ai.ts +2349 -3785
- package/extensions/quiet-tools.ts +515 -32
- package/extensions/sdd-init.ts +4 -8
- package/lib/agent-home.ts +8 -0
- package/lib/gentle-ai-renderer.ts +70 -0
- package/lib/model-routing-authority.ts +133 -0
- package/lib/native-review-cli.ts +387 -940
- package/lib/opaque-pi-reviewer-adapter.ts +284 -0
- package/lib/provider-contract-bundle.ts +88 -6
- package/lib/review-candidate-view.ts +341 -132
- package/lib/review-host-relay.ts +324 -96
- package/lib/review-integration-v2.ts +868 -307
- package/lib/review-last-event-controller.ts +35 -0
- package/lib/sdd-preflight.ts +179 -68
- package/lib/sdd-status.ts +66 -111
- package/lib/terminal-theme.ts +1 -1
- package/package.json +83 -82
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/native-review-cli.mjs +337 -890
- package/runtime/review-integration-v2.mjs +816 -255
- package/runtime/review-relay-contract.mjs +1 -1
- package/scripts/{build-git-commit-transaction-runner.mjs → build-runtime-modules.mjs} +4 -5
- package/scripts/gentle-ai-installer.mjs +75 -22
- package/scripts/maintainer/provider-relay-matrix.mjs +195 -11
- package/scripts/test-packed-runner.mjs +4 -7
- package/scripts/verify-package-files.mjs +23 -23
- package/skills/_shared/review-ledger-contract.md +14 -14
- package/skills/chained-pr/SKILL.md +3 -0
- package/skills/cognitive-doc-design/SKILL.md +1 -1
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/gentle-ai/SKILL.md +7 -74
- package/skills/issue-creation/SKILL.md +53 -93
- package/skills/judgment-day/SKILL.md +5 -7
- package/skills/rdd-defect-workflow/SKILL.md +3 -3
- package/skills/release/SKILL.md +3 -3
- package/skills/skill-registry/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +3 -1
- package/tests/artifact-language.test.ts +24 -11
- package/tests/ask-user-choice.test.ts +264 -0
- package/tests/codegraph-tools.test.ts +3 -3
- package/tests/crosslane/cross-lane.mjs +15 -1168
- package/tests/delegated-key-learnings-contract.test.ts +8 -6
- package/tests/devbinary/native-review-parity.devtest.ts +167 -250
- package/tests/devbinary/pi-host-relay.devtest.ts +867 -0
- package/tests/fixtures/devbinary/last-event-capture-correction-plan.captured.json +10 -0
- package/tests/fixtures/devbinary/last-event-capture-refuter-approved.captured.json +20 -0
- package/tests/fixtures/devbinary/last-event-capture-refuter-correction-required.captured.json +26 -0
- package/tests/fixtures/devbinary/last-event-capture-result-approved.captured.json +8 -0
- package/tests/fixtures/devbinary/last-event-capture-result-correction-required.captured.json +26 -0
- package/tests/fixtures/devbinary/last-event-capture-validation-approved.captured.json +8 -0
- package/tests/fixtures/devbinary/last-event-closure.provenance.md +13 -0
- package/tests/fixtures/devbinary/review-acknowledged-v1.captured.json +9 -0
- package/tests/fixtures/devbinary/review-acknowledged.provenance.md +31 -0
- package/tests/fixtures/devbinary/start-v3-zero-lens-closed.captured.json +21 -0
- package/tests/fixtures/native-review-cli/v2.5.0-rc.1/PROVENANCE.txt +15 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/README.md +22 -0
- package/{contracts/review-provider-contract-mirror/v1.1.0/bundle → tests/fixtures/provider-contract-bundle/v1.2.0}/manifest.json +11 -2
- package/tests/fixtures/provider-contract-bundle/v1.2.0/orchestration/pi.md +97 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/schemas/lens.schema.json +16 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/schemas/refuter.schema.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/lens.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/refuter.json +1 -0
- package/tests/fixtures/provider-contract-bundle/v1.2.0/vectors/targeted-validator.json +1 -0
- package/tests/gentle-ai-binary.test.ts +83 -13
- package/tests/gentle-ai-dev-binary.test.ts +51 -228
- package/tests/gentle-ai-installer.test.ts +137 -47
- package/tests/gentle-ai.test.ts +821 -131
- package/tests/gentle-theme.test.ts +133 -0
- package/tests/issue-creation-skill.test.ts +103 -0
- package/tests/maintainer/provider-relay.maintest.ts +340 -4
- package/tests/model-routing-authority.test.ts +257 -0
- package/tests/native-review-capability-contract.test.ts +45 -1
- package/tests/native-review-cli.test.ts +586 -962
- package/tests/native-review-consent.test.ts +150 -66
- package/tests/native-review-parity-runtime.test.ts +80 -359
- package/tests/native-review-parity.test.ts +674 -925
- package/tests/opaque-pi-reviewer-adapter.test.ts +266 -0
- package/tests/orchestrator-budget.test.ts +132 -88
- package/tests/orchestrator-rdd-ownership.test.ts +103 -0
- package/tests/package-manifest.test.ts +152 -36
- package/tests/provider-contract-bundle.test.ts +76 -0
- package/tests/provider-contract-mirror.test.ts +19 -0
- package/tests/provider-defect-handoff.test.ts +15 -118
- package/tests/quiet-tool-rendering.test.ts +1055 -28
- package/tests/review-agent-end-preflight.test.ts +408 -0
- package/tests/review-authority-recovery-docs.test.ts +1 -2
- package/tests/review-candidate-view.test.ts +409 -3
- package/tests/review-compact-contract.test.ts +4 -30
- package/tests/review-contract-prompt.test.ts +139 -0
- package/tests/review-controller-lock-status.test.ts +2 -2
- package/tests/review-controller-native-recovery.test.ts +363 -1450
- package/tests/review-controller-native-routing.test.ts +1251 -5642
- package/tests/review-controller-retired-ops.test.ts +1 -1
- package/tests/review-controller-workspace-root.test.ts +222 -71
- package/tests/review-controller.test.ts +26 -816
- package/tests/review-corrected-finalize-binding.test.ts +112 -153
- package/tests/review-dispatch-hydration-gap.test.ts +1 -53
- package/tests/review-gate.test.ts +0 -45
- package/tests/review-host-relay-restart-parity.test.ts +360 -0
- package/tests/review-host-relay-routing.test.ts +328 -91
- package/tests/review-host-relay.test.ts +436 -14
- package/tests/review-integration-v2-forward.test.ts +623 -553
- package/tests/review-integration-v2.test.ts +239 -165
- package/tests/review-last-event-closure.test.ts +408 -0
- package/tests/review-ledger-contract.test.ts +97 -35
- package/tests/review-recovered-lineage-routing.test.ts +0 -47
- package/tests/review-relay-transport-agent.test.ts +119 -46
- package/tests/review-snapshot.test.ts +3 -2
- package/tests/runtime-harness.mjs +362 -196
- package/tests/sdd-agent-tools.test.ts +36 -0
- package/tests/sdd-preflight.test.ts +81 -15
- package/tests/sdd-status.test.ts +109 -110
- package/tests/skill-collision-prefixes.test.ts +5 -8
- package/tests/writer-edit-surface-scope.test.ts +366 -0
- package/themes/Gentleman-Cute.json +94 -0
- package/themes/Gentleman-Sexy.json +92 -0
- package/lib/git-commit-transaction.ts +0 -861
- package/runtime/git-commit-transaction.mjs +0 -862
- package/scripts/run-git-commit-transaction.mjs +0 -35
- package/tests/fixtures/native-review-cli/v2.1.3/sdd-status-engram.json +0 -139
- package/tests/fixtures/native-review-cli/v2.1.3/sdd-status.json +0 -200
- package/tests/git-commit-transaction.test.ts +0 -530
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.1.0 → v1.2.0}/bundle/vectors/targeted-validator.json +0 -0
- /package/{contracts/review-provider-contract-mirror/v1.1.0/bundle → tests/fixtures/provider-contract-bundle/v1.2.0}/schemas/targeted-validator.schema.json +0 -0
|
@@ -46,13 +46,6 @@ const DELEGATION_CHOICE1_ORDER = [
|
|
|
46
46
|
"execute the shared candidate-scoped continuation below",
|
|
47
47
|
] as const;
|
|
48
48
|
|
|
49
|
-
const SDD_CHOICE1_ORDER = [
|
|
50
|
-
"Complete a definitive lookup across open and closed issues",
|
|
51
|
-
"Derive the evidence channel only from the installed build string",
|
|
52
|
-
"If the installed build predates the relevant published fix",
|
|
53
|
-
"perform no further GitHub mutation and no blind retry",
|
|
54
|
-
] as const;
|
|
55
|
-
|
|
56
49
|
// ---------------------------------------------------------------------------
|
|
57
50
|
// 1 — assets/orchestrator-delegation.md structural presence
|
|
58
51
|
// ---------------------------------------------------------------------------
|
|
@@ -101,6 +94,12 @@ test("orchestrator-delegation.md states the admissibility-before-relay rule", ()
|
|
|
101
94
|
assert.match(DELEGATION, /The test is what produced the failure, not what the work was doing when it happened/i);
|
|
102
95
|
});
|
|
103
96
|
|
|
97
|
+
test("orchestrator-delegation.md excludes local consent lifecycle outcomes from provider-defect reporting", () => {
|
|
98
|
+
assert.match(DELEGATION, /`consent-binding-expired` and `consent-binding-already-consumed` are local lifecycle outcomes, not Gentle AI provider defects/i);
|
|
99
|
+
assert.match(DELEGATION, /An unknown consent binding is reportable only when independent evidence proves a fresh, same-session, unconsumed binding was lost/i);
|
|
100
|
+
assert.match(DELEGATION, /Never infer that evidence from the old combined stale-binding message/i);
|
|
101
|
+
});
|
|
102
|
+
|
|
104
103
|
test("orchestrator-delegation.md states the never-offer-to-repair rule", () => {
|
|
105
104
|
assert.match(
|
|
106
105
|
DELEGATION,
|
|
@@ -231,125 +230,23 @@ test("orchestrator-delegation.md does NOT reference the rc.3 canon", () => {
|
|
|
231
230
|
});
|
|
232
231
|
|
|
233
232
|
// ---------------------------------------------------------------------------
|
|
234
|
-
// 3 —
|
|
233
|
+
// 3 — SDD points to the single complete handoff contract
|
|
235
234
|
// ---------------------------------------------------------------------------
|
|
236
235
|
|
|
237
|
-
test("sdd-orchestrator-workflow.md
|
|
236
|
+
test("sdd-orchestrator-workflow.md points provider defects to the complete delegation contract", () => {
|
|
238
237
|
assert.match(SDD_WORKFLOW, /## Provider Defect Handoff/);
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
test("sdd-orchestrator-workflow.md references v2.4.0-rc.8 and the consent/v3 envelope", () => {
|
|
242
|
-
assert.match(SDD_WORKFLOW, /v2\.4\.0-rc\.8/);
|
|
243
|
-
assert.match(SDD_WORKFLOW, /gentle-ai\.review-integration\.consent\/v3/);
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
test("sdd-orchestrator-workflow.md lists all three semantic choice tokens in order", () => {
|
|
247
|
-
for (const token of CHOICE_TOKENS) {
|
|
248
|
-
assert.ok(
|
|
249
|
-
SDD_WORKFLOW.includes(`\`${token}\``),
|
|
250
|
-
`sdd-orchestrator-workflow.md missing semantic choice token: ${token}`,
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const positions = CHOICE_TOKENS.map((token) => SDD_WORKFLOW.indexOf(`\`${token}\``));
|
|
255
|
-
for (const pos of positions) {
|
|
256
|
-
assert.notEqual(pos, -1, "a choice token is missing; ordering assertion is meaningless");
|
|
257
|
-
}
|
|
258
|
-
assert.ok(
|
|
259
|
-
positions[0] < positions[1],
|
|
260
|
-
`report_and_continue must appear before continue_without_reporting in sdd-orchestrator-workflow.md; got positions ${positions}`,
|
|
261
|
-
);
|
|
262
|
-
assert.ok(
|
|
263
|
-
positions[1] < positions[2],
|
|
264
|
-
`continue_without_reporting must appear before stop_here in sdd-orchestrator-workflow.md; got positions ${positions}`,
|
|
265
|
-
);
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
test("sdd-orchestrator-workflow.md preserves the rc.8 choice-1 ordering on the concise surface", () => {
|
|
269
|
-
assertChoice1Order(SDD_WORKFLOW, SDD_CHOICE1_ORDER, "sdd-orchestrator-workflow.md");
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
test("sdd-orchestrator-workflow.md references the full contract in orchestrator-delegation.md", () => {
|
|
273
238
|
assert.match(
|
|
274
239
|
SDD_WORKFLOW,
|
|
275
240
|
/The full contract lives in `assets\/orchestrator-delegation\.md` under `#### Gentle AI Provider Defect Handoff \(MANDATORY\)`/i,
|
|
276
241
|
);
|
|
277
|
-
// The pointer must resolve: the named heading has to exist on the delegation surface.
|
|
278
242
|
assert.match(DELEGATION, /^#### Gentle AI Provider Defect Handoff \(MANDATORY\)$/m);
|
|
243
|
+
assert.doesNotMatch(SDD_WORKFLOW, /`report_and_continue`|`continue_without_reporting`|`stop_here`/);
|
|
279
244
|
});
|
|
280
245
|
|
|
281
|
-
test("
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
assert.
|
|
286
|
-
|
|
287
|
-
/Never offer to switch to, inspect, modify, or directly repair the Gentle AI repository/i,
|
|
288
|
-
);
|
|
289
|
-
// consent
|
|
290
|
-
assert.match(SDD_WORKFLOW, /Ask the user first, in the active conversation language, for explicit consent to report the apparent defect/i);
|
|
291
|
-
// privacy
|
|
292
|
-
assert.match(SDD_WORKFLOW, /Privacy scrub immediately before the first GitHub operation/i);
|
|
293
|
-
// definitive lookup
|
|
294
|
-
assert.match(SDD_WORKFLOW, /Complete a definitive lookup across open and closed issues in `Gentleman-Programming\/gentle-ai`/i);
|
|
295
|
-
// evidence channel
|
|
296
|
-
assert.match(SDD_WORKFLOW, /recognized prerelease tags are `-rc\.` and `-main\.`; every other build is stable/i);
|
|
297
|
-
assert.match(SDD_WORKFLOW, /never recommend switching channels/i);
|
|
298
|
-
// outdated + regression
|
|
299
|
-
assert.match(SDD_WORKFLOW, /If the installed build predates the relevant published fix, recommend installing it and reproducing/i);
|
|
300
|
-
assert.match(SDD_WORKFLOW, /treat it as a possible regression/i);
|
|
301
|
-
assert.match(SDD_WORKFLOW, /never reopen automatically/i);
|
|
302
|
-
// confirmed creation
|
|
303
|
-
assert.match(SDD_WORKFLOW, /Confirmed creation requires the GitHub create operation to confirm a newly-created issue identity\/URL/i);
|
|
304
|
-
// uncertainty continuation
|
|
305
|
-
assert.match(SDD_WORKFLOW, /perform no further GitHub mutation and no blind retry/i);
|
|
306
|
-
assert.match(SDD_WORKFLOW, /execute the exact captured provider-owned decline invocation exactly once, validate it, re-enter native negotiated STATUS, and resume the already-held consumer continuation/i);
|
|
307
|
-
// exact decline
|
|
308
|
-
assert.match(SDD_WORKFLOW, /Both continue choices execute that exact captured decline invocation exactly once/i);
|
|
309
|
-
assert.match(SDD_WORKFLOW, /never synthesize the decline command, target, token, or consumer continuation from prose/i);
|
|
310
|
-
// scope/mode
|
|
311
|
-
assert.match(SDD_WORKFLOW, /Do not invoke `gentle-ai review mode disable` at clone or global scope within this handoff/i);
|
|
312
|
-
assert.match(SDD_WORKFLOW, /Do not turn RDD off or on within this handoff/i);
|
|
313
|
-
// resume
|
|
314
|
-
assert.match(SDD_WORKFLOW, /Resume after an installed published fix or an explicit maintainer-authorized, documented native recovery or reset/i);
|
|
315
|
-
assert.match(SDD_WORKFLOW, /Never resume against unpublished code/i);
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
test("sdd-orchestrator-workflow.md does NOT carry the gentle-report label discipline", () => {
|
|
319
|
-
assert.equal(
|
|
320
|
-
SDD_WORKFLOW.includes("gentle-report"),
|
|
321
|
-
false,
|
|
322
|
-
"sdd-orchestrator-workflow.md must not reference the removed gentle-report label",
|
|
323
|
-
);
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
test("sdd-orchestrator-workflow.md does NOT make published fixes the sole resumption route", () => {
|
|
327
|
-
assert.equal(
|
|
328
|
-
SDD_WORKFLOW.includes("Resume only after an installed published fix"),
|
|
329
|
-
false,
|
|
330
|
-
"sdd-orchestrator-workflow.md must not state the prohibited sole-resumption route",
|
|
331
|
-
);
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
test("sdd-orchestrator-workflow.md does NOT retain the rc.3 hard-stop that withholds the decline invocation", () => {
|
|
335
|
-
assert.equal(
|
|
336
|
-
SDD_WORKFLOW.includes("Any report ambiguity or failure is a hard stop: preserve all consumer state and do not execute the decline invocation"),
|
|
337
|
-
false,
|
|
338
|
-
"sdd-orchestrator-workflow.md must not retain the rc.3 hard-stop wedge",
|
|
339
|
-
);
|
|
340
|
-
});
|
|
341
|
-
|
|
342
|
-
test("both handoff surfaces invoke `gentle-ai review mode disable` exactly once", () => {
|
|
343
|
-
// The delegation surface carries the contract inside the canon block, so its
|
|
344
|
-
// section is bounded by the following `####` canon heading, not by `## `.
|
|
345
|
-
const surfaces = [
|
|
346
|
-
["orchestrator-delegation.md", DELEGATION, /#### Gentle AI Provider Defect Handoff[\s\S]*?(?=\n#### SDD Edit-Authority|$)/],
|
|
347
|
-
["sdd-orchestrator-workflow.md", SDD_WORKFLOW, /## Provider Defect Handoff[\s\S]*?(?=\n## |$)/],
|
|
348
|
-
] as const;
|
|
349
|
-
for (const [name, asset, sectionPattern] of surfaces) {
|
|
350
|
-
const section = asset.match(sectionPattern)?.[0] ?? "";
|
|
351
|
-
assert.ok(section.length > 0, `${name}: provider defect handoff section not found`);
|
|
352
|
-
const n = countOccurrences(section, "gentle-ai review mode disable");
|
|
353
|
-
assert.equal(n, 1, `${name} must invoke "gentle-ai review mode disable" exactly once; got ${n}`);
|
|
354
|
-
}
|
|
246
|
+
test("the complete delegation handoff invokes `gentle-ai review mode disable` exactly once", () => {
|
|
247
|
+
const section = DELEGATION.match(
|
|
248
|
+
/#### Gentle AI Provider Defect Handoff[\s\S]*?(?=\n#### SDD Edit-Authority|$)/,
|
|
249
|
+
)?.[0] ?? "";
|
|
250
|
+
assert.ok(section.length > 0, "orchestrator-delegation.md: provider defect handoff section not found");
|
|
251
|
+
assert.equal(countOccurrences(section, "gentle-ai review mode disable"), 1);
|
|
355
252
|
});
|