gentle-pi 2.1.2 → 2.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.
Files changed (171) hide show
  1. package/README.md +70 -12
  2. package/assets/agents/gentle-ai-worker.md +7 -3
  3. package/assets/agents/jd-fix-agent.md +1 -1
  4. package/assets/agents/jd-judge-a.md +3 -1
  5. package/assets/agents/jd-judge-b.md +3 -1
  6. package/assets/agents/review-readability.md +4 -1
  7. package/assets/agents/review-reliability.md +4 -1
  8. package/assets/agents/review-resilience.md +4 -1
  9. package/assets/agents/review-risk.md +4 -1
  10. package/assets/agents/sdd-apply.md +6 -1
  11. package/assets/agents/sdd-archive.md +6 -1
  12. package/assets/agents/sdd-design.md +6 -1
  13. package/assets/agents/sdd-explore.md +6 -2
  14. package/assets/agents/sdd-init.md +10 -2
  15. package/assets/agents/sdd-onboard.md +6 -1
  16. package/assets/agents/sdd-proposal.md +6 -1
  17. package/assets/agents/sdd-spec.md +6 -1
  18. package/assets/agents/sdd-status.md +6 -1
  19. package/assets/agents/sdd-sync.md +6 -1
  20. package/assets/agents/sdd-tasks.md +6 -1
  21. package/assets/agents/sdd-verify.md +6 -1
  22. package/assets/chains/4r-review.chain.md +2 -0
  23. package/assets/chains/sdd-full.chain.md +1 -1
  24. package/assets/chains/sdd-plan.chain.md +1 -1
  25. package/assets/chains/sdd-verify.chain.md +1 -1
  26. package/assets/orchestrator-delegation.md +246 -67
  27. package/assets/orchestrator.md +7 -14
  28. package/assets/sdd-orchestrator-workflow.md +154 -9
  29. package/assets/support/sdd-status-contract.md +19 -1
  30. package/contracts/review-integration/v1/fixtures/consent.fixture.json +3 -3
  31. package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +19 -28
  32. package/contracts/review-integration/v1/fixtures/start.fixture.json +1 -10
  33. package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +12 -21
  34. package/contracts/review-integration/v1/schemas/correction-plan-request.schema.json +49 -0
  35. package/contracts/review-integration/v1/schemas/operation.schema.json +76 -0
  36. package/contracts/review-integration/v1/schemas/repair.schema.json +39 -0
  37. package/contracts/review-integration/v1/schemas/status-v2.schema.json +4 -2
  38. package/contracts/review-integration/v1/schemas/status.schema.json +4 -2
  39. package/contracts/review-integration/v2/fixtures/consent.fixture.json +1 -1
  40. package/contracts/review-integration/v2/fixtures/start.fixture.json +1 -10
  41. package/contracts/review-integration/v2/fixtures/status.fixture.json +1 -10
  42. package/contracts/review-integration/v2/schemas/failure.schema.json +5 -1
  43. package/contracts/review-integration/v2/schemas/operation.schema.json +6 -1
  44. package/contracts/review-integration/v2/schemas/repair.schema.json +4 -2
  45. package/contracts/review-integration/v2/schemas/start.schema.json +5 -2
  46. package/contracts/review-integration/v2/schemas/status.schema.json +4 -2
  47. package/contracts/review-provider-contract-mirror/provider-contract.lock.json +30 -0
  48. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/README.md +12 -0
  49. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/manifest.json +65 -0
  50. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/lens.schema.json +16 -0
  51. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/refuter.schema.json +1 -0
  52. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/targeted-validator.schema.json +1 -0
  53. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/lens.json +1 -0
  54. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/refuter.json +1 -0
  55. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/targeted-validator.json +1 -0
  56. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-capabilities.baseline.json +15 -0
  57. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-roles.baseline.json +42 -0
  58. package/docs/native-authority-architecture.md +5 -5
  59. package/docs/review-integration.md +22 -2
  60. package/extensions/gentle-ai.ts +1595 -201
  61. package/extensions/sdd-init.ts +19 -6
  62. package/extensions/skill-registry.ts +10 -2
  63. package/extensions/startup-banner.ts +10 -4
  64. package/lib/gentle-ai-binary.ts +173 -2
  65. package/lib/git-commit-transaction.ts +77 -17
  66. package/lib/native-review-cli.ts +528 -65
  67. package/lib/provider-contract-bundle.ts +704 -0
  68. package/lib/review-candidate-view.ts +527 -18
  69. package/lib/review-compact-contract.ts +59 -248
  70. package/lib/review-host-relay.ts +436 -0
  71. package/lib/review-integration-v2.ts +537 -36
  72. package/lib/review-relay-contract.ts +16 -0
  73. package/lib/sdd-preflight.ts +53 -1
  74. package/package.json +5 -2
  75. package/runtime/gentle-ai-binary.mjs +173 -2
  76. package/runtime/git-commit-transaction.mjs +75 -15
  77. package/runtime/native-review-cli.mjs +524 -61
  78. package/runtime/review-integration-v2.mjs +536 -35
  79. package/runtime/review-relay-contract.mjs +17 -0
  80. package/scripts/build-git-commit-transaction-runner.mjs +1 -0
  81. package/scripts/check-provider-contract.mjs +138 -0
  82. package/scripts/gentle-ai-installer.mjs +23 -13
  83. package/scripts/maintainer/provider-relay-matrix.mjs +219 -0
  84. package/scripts/mirror-provider-contract.mjs +143 -0
  85. package/scripts/test-packed-runner.mjs +16 -2
  86. package/scripts/verify-package-files.mjs +110 -33
  87. package/skills/_shared/review-ledger-contract.md +4 -6
  88. package/skills/gentle-ai/SKILL.md +4 -4
  89. package/skills/issue-creation/SKILL.md +94 -168
  90. package/skills/judgment-day/SKILL.md +7 -1
  91. package/skills/judgment-day/references/prompts-and-formats.md +2 -0
  92. package/skills/rdd-defect-workflow/SKILL.md +54 -0
  93. package/tests/background-subagents.test.ts +771 -0
  94. package/tests/crosslane/cross-lane.mjs +1169 -0
  95. package/tests/delegated-key-learnings-contract.test.ts +238 -0
  96. package/tests/fixtures/devbinary/capabilities-v2.1.derived.json +331 -0
  97. package/tests/fixtures/devbinary/capabilities-v2.2.captured.json +340 -0
  98. package/tests/fixtures/devbinary/consent-v3.captured.json +37 -0
  99. package/tests/fixtures/devbinary/failure-v2-capture-evidence.captured.json +16 -0
  100. package/tests/fixtures/devbinary/result-artifact-v2-path.captured.json +12 -0
  101. package/tests/fixtures/devbinary/result-artifact-v2.captured.json +12 -0
  102. package/tests/fixtures/devbinary/start-v3-consent-declined.captured.json +19 -0
  103. package/tests/fixtures/devbinary/start-v3-consent-granted.captured.json +109 -0
  104. package/tests/fixtures/devbinary/status-v5-capture-result-submission.captured.json +184 -0
  105. package/tests/fixtures/devbinary/status-v5-repository-context.captured.json +138 -0
  106. package/tests/fixtures/devbinary/status-v5.captured.json +88 -0
  107. package/tests/fixtures/provider-contract-bundle/v1.1.0/README.md +12 -0
  108. package/tests/fixtures/provider-contract-bundle/v1.1.0/manifest.json +65 -0
  109. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/lens.schema.json +16 -0
  110. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/refuter.schema.json +1 -0
  111. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/targeted-validator.schema.json +1 -0
  112. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/lens.json +1 -0
  113. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/refuter.json +1 -0
  114. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/targeted-validator.json +1 -0
  115. package/tests/gentle-ai-binary.test.ts +1 -1
  116. package/tests/gentle-ai-dev-binary-surfacing.test.ts +195 -0
  117. package/tests/gentle-ai-dev-binary.test.ts +336 -0
  118. package/tests/gentle-ai-installer.test.ts +46 -46
  119. package/tests/git-commit-transaction.test.ts +229 -1
  120. package/tests/maintainer/provider-relay.maintest.ts +265 -0
  121. package/tests/native-review-capability-contract.test.ts +48 -2
  122. package/tests/native-review-cli.test.ts +56 -0
  123. package/tests/native-review-consent.test.ts +164 -3
  124. package/tests/native-review-parity-runtime.test.ts +37 -0
  125. package/tests/native-review-parity.test.ts +218 -15
  126. package/tests/native-sdd-attempt-authority.test.ts +235 -0
  127. package/tests/orchestrator-budget.test.ts +30 -5
  128. package/tests/package-manifest.test.ts +98 -72
  129. package/tests/provider-contract-bundle.test.ts +385 -0
  130. package/tests/provider-contract-mirror.test.ts +206 -0
  131. package/tests/provider-defect-handoff.test.ts +355 -0
  132. package/tests/review-actor-tool-deny.test.ts +12 -13
  133. package/tests/review-candidate-view.test.ts +489 -9
  134. package/tests/review-compact-contract.test.ts +52 -119
  135. package/tests/review-controller-native-recovery.test.ts +643 -47
  136. package/tests/review-controller-native-routing.test.ts +1667 -222
  137. package/tests/review-controller-workspace-root.test.ts +17 -2
  138. package/tests/review-corrected-finalize-binding.test.ts +175 -0
  139. package/tests/review-dispatch-hydration-gap.test.ts +197 -0
  140. package/tests/review-host-relay-routing.test.ts +317 -0
  141. package/tests/review-host-relay.test.ts +520 -0
  142. package/tests/review-integration-v2-forward.test.ts +631 -0
  143. package/tests/review-integration-v2.test.ts +114 -0
  144. package/tests/review-ledger-contract.test.ts +12 -28
  145. package/tests/review-recovered-lineage-routing.test.ts +246 -0
  146. package/tests/review-relay-transport-agent.test.ts +249 -0
  147. package/tests/runtime-harness.mjs +242 -14
  148. package/tests/sdd-agent-tools.test.ts +18 -33
  149. package/tests/skill-collision-prefixes.test.ts +1 -0
  150. package/tests/skill-registry.test.ts +50 -1
  151. package/tests/verify-package-files.test.ts +62 -0
  152. package/assets/agents/review-refuter.md +0 -40
  153. package/assets/agents/review-validator.md +0 -23
  154. package/lib/native-review-remediation.ts +0 -49
  155. package/lib/review-compact.ts +0 -947
  156. package/lib/review-refuter-adapter.ts +0 -129
  157. package/lib/review-runtime-contract.ts +0 -68
  158. package/prompts/gcl.md +0 -54
  159. package/prompts/gis.md +0 -25
  160. package/prompts/gpr.md +0 -41
  161. package/prompts/gwr.md +0 -31
  162. package/tests/fixtures/native-review-cli/v2.1.2/bind-sdd.json +0 -25
  163. package/tests/fixtures/native-review-cli/v2.1.2/finalize.json +0 -8
  164. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status-engram.json +0 -139
  165. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status.json +0 -200
  166. package/tests/fixtures/native-review-cli/v2.1.2/start.json +0 -12
  167. package/tests/fixtures/native-review-cli/v2.1.2/validate-allow.json +0 -24
  168. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny-empty-context.json +0 -20
  169. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny.json +0 -28
  170. package/tests/review-compact.test.ts +0 -243
  171. package/tests/review-refuter-adapter.test.ts +0 -89
@@ -1,129 +0,0 @@
1
- import {
2
- COMPACT_FINDING_OUTCOME,
3
- type CompactRefuterRequest,
4
- type CompactRefuterResult,
5
- } from "./review-compact.ts";
6
-
7
- const REFUTER_BATCH_SCHEMA = "gentle-ai.refuter-result-batch/v1";
8
- const DIGEST = /^[0-9a-f]{64}$/;
9
-
10
- export const REFUTER_BATCH_STATUS = {
11
- NORMALIZED: "normalized",
12
- INVALID: "invalid",
13
- } as const;
14
-
15
- export interface RefuterBatchRow {
16
- finding_id: string;
17
- outcome: CompactRefuterResult["outcome"];
18
- proof_refs: string[];
19
- }
20
-
21
- export interface RefuterBatch {
22
- schema: typeof REFUTER_BATCH_SCHEMA;
23
- request_hash: string;
24
- results: RefuterBatchRow[];
25
- }
26
-
27
- export interface NativeRefuterDocument {
28
- results: RefuterBatchRow[];
29
- }
30
-
31
- interface NormalizedRefuterBatch {
32
- status: typeof REFUTER_BATCH_STATUS.NORMALIZED;
33
- refuter_request_hash: string;
34
- refuter_results: CompactRefuterResult[];
35
- }
36
-
37
- interface InvalidRefuterBatch {
38
- status: typeof REFUTER_BATCH_STATUS.INVALID;
39
- reason_code: string;
40
- }
41
-
42
- export type RefuterBatchNormalization = NormalizedRefuterBatch | InvalidRefuterBatch;
43
-
44
- function invalid(reason_code: string): InvalidRefuterBatch {
45
- return { status: REFUTER_BATCH_STATUS.INVALID, reason_code };
46
- }
47
-
48
- function record(value: unknown): Record<string, unknown> | undefined {
49
- if (typeof value !== "object" || value === null || Array.isArray(value) || Object.getPrototypeOf(value) !== Object.prototype) return undefined;
50
- return value as Record<string, unknown>;
51
- }
52
-
53
- function exact(object: Record<string, unknown>, keys: readonly string[]): boolean {
54
- return Object.keys(object).length === keys.length && keys.every((key) => key in object);
55
- }
56
-
57
- function parseBatch(value: unknown): RefuterBatch | InvalidRefuterBatch {
58
- let raw = value;
59
- if (typeof raw === "string") {
60
- if (raw.length === 0 || raw.trim() !== raw) return invalid("refuter-batch-prose");
61
- try {
62
- raw = JSON.parse(raw) as unknown;
63
- } catch {
64
- return invalid("refuter-batch-json");
65
- }
66
- }
67
- const batch = record(raw);
68
- if (!batch || !exact(batch, ["schema", "request_hash", "results"])) return invalid("refuter-batch-shape");
69
- if (batch.schema !== REFUTER_BATCH_SCHEMA || typeof batch.request_hash !== "string" || !DIGEST.test(batch.request_hash) || !Array.isArray(batch.results)) {
70
- return invalid("refuter-batch-shape");
71
- }
72
- const results: RefuterBatchRow[] = [];
73
- for (const result of batch.results) {
74
- const row = record(result);
75
- if (!row || !exact(row, ["finding_id", "outcome", "proof_refs"])) return invalid("refuter-row-shape");
76
- if (
77
- typeof row.finding_id !== "string" || row.finding_id.length === 0 || row.finding_id.trim() !== row.finding_id ||
78
- (row.outcome !== COMPACT_FINDING_OUTCOME.REFUTED && row.outcome !== COMPACT_FINDING_OUTCOME.CORROBORATED && row.outcome !== COMPACT_FINDING_OUTCOME.INCONCLUSIVE) ||
79
- !Array.isArray(row.proof_refs) ||
80
- row.proof_refs.length === 0 ||
81
- row.proof_refs.some((proof) => typeof proof !== "string" || proof.length === 0 || proof.trim() !== proof)
82
- ) return invalid("refuter-row-value");
83
- results.push({ finding_id: row.finding_id, outcome: row.outcome, proof_refs: [...row.proof_refs] });
84
- }
85
- return { schema: REFUTER_BATCH_SCHEMA, request_hash: batch.request_hash, results };
86
- }
87
-
88
- export function parseRefuterBatch(value: unknown): RefuterBatch {
89
- const batch = parseBatch(value);
90
- if ("status" in batch) throw new TypeError(batch.reason_code);
91
- return batch;
92
- }
93
-
94
- export function toNativeRefuterDocument(batch: RefuterBatch): NativeRefuterDocument {
95
- return { results: batch.results.map((row) => ({ ...row, proof_refs: [...row.proof_refs] })) };
96
- }
97
-
98
- export function normalizeRefuterBatch(
99
- request: CompactRefuterRequest,
100
- value: unknown,
101
- ): RefuterBatchNormalization {
102
- const batch = parseBatch(value);
103
- if ("status" in batch) return batch;
104
- if (batch.request_hash !== request.request_hash) return invalid("refuter-request-hash");
105
- const frozen = new Map(request.findings.map((finding) => [finding.id, finding]));
106
- const rows = new Map<string, RefuterBatchRow>();
107
- for (const row of batch.results) {
108
- const finding = frozen.get(row.finding_id);
109
- if (!finding) return invalid("refuter-finding-id");
110
- if (rows.has(row.finding_id)) return invalid("refuter-duplicate-id");
111
- if (row.proof_refs.length === 0 || new Set(row.proof_refs).size !== row.proof_refs.length) return invalid("refuter-proof-refs");
112
- rows.set(row.finding_id, row);
113
- }
114
- if (rows.size !== request.findings.length) return invalid("refuter-missing-id");
115
- const refuter_results = request.findings.map((finding) => {
116
- const row = rows.get(finding.id);
117
- if (!row) throw new Error("Complete refuter batch lost a frozen finding");
118
- return {
119
- finding_id: row.finding_id,
120
- outcome: row.outcome,
121
- proof_refs: [...row.proof_refs].toSorted(),
122
- };
123
- });
124
- return {
125
- status: REFUTER_BATCH_STATUS.NORMALIZED,
126
- refuter_request_hash: request.request_hash,
127
- refuter_results,
128
- };
129
- }
@@ -1,68 +0,0 @@
1
- import { domainHashV1 } from "./review-canonical.ts";
2
-
3
- export const REVIEW_RUNTIME_INCOMPATIBLE = "REVIEW_RUNTIME_INCOMPATIBLE";
4
-
5
- export interface LoadedReviewRuntimeIdentityV1 {
6
- schema: "gentle-ai.review-runtime/v1";
7
- compact_contract: "gentle-ai.review-compact/v2";
8
- operation_contract: string;
9
- state_schema: "gentle-ai.review-state/v2";
10
- record_schema: "gentle-ai.review-state-record/v2";
11
- receipt_schema: "gentle-ai.review-receipt-body/v2";
12
- canonicalization: "gentle-ai.canonical-json/v1";
13
- identity_hash: string;
14
- }
15
-
16
- function identityBody(): Omit<LoadedReviewRuntimeIdentityV1, "identity_hash"> {
17
- return {
18
- schema: "gentle-ai.review-runtime/v1",
19
- compact_contract: "gentle-ai.review-compact/v2",
20
- operation_contract: "gentle-ai.review-operation/v1",
21
- state_schema: "gentle-ai.review-state/v2",
22
- record_schema: "gentle-ai.review-state-record/v2",
23
- receipt_schema: "gentle-ai.review-receipt-body/v2",
24
- canonicalization: "gentle-ai.canonical-json/v1",
25
- };
26
- }
27
-
28
- function createIdentity(): LoadedReviewRuntimeIdentityV1 {
29
- const body = identityBody();
30
- return { ...body, identity_hash: domainHashV1("review-runtime-contract", body) };
31
- }
32
-
33
- let testIdentity: LoadedReviewRuntimeIdentityV1 | undefined;
34
-
35
- export function loadedReviewRuntimeIdentity(): LoadedReviewRuntimeIdentityV1 {
36
- return testIdentity ?? createIdentity();
37
- }
38
-
39
- function identityHash(identity: Omit<LoadedReviewRuntimeIdentityV1, "identity_hash">): string {
40
- return domainHashV1("review-runtime-contract", identity);
41
- }
42
-
43
- export function assertReviewRuntimeIdentity(identity: LoadedReviewRuntimeIdentityV1): void {
44
- if (!hasValidIdentityHash(identity)) throw new Error(REVIEW_RUNTIME_INCOMPATIBLE);
45
- }
46
-
47
- function hasValidIdentityHash(identity: LoadedReviewRuntimeIdentityV1): boolean {
48
- return identity.identity_hash === identityHash({
49
- schema: identity.schema,
50
- compact_contract: identity.compact_contract,
51
- operation_contract: identity.operation_contract,
52
- state_schema: identity.state_schema,
53
- record_schema: identity.record_schema,
54
- receipt_schema: identity.receipt_schema,
55
- canonicalization: identity.canonicalization,
56
- });
57
- }
58
-
59
- export function assertLoadedReviewRuntimeIdentity(expected: LoadedReviewRuntimeIdentityV1): void {
60
- const actual = loadedReviewRuntimeIdentity();
61
- assertReviewRuntimeIdentity(actual);
62
- assertReviewRuntimeIdentity(expected);
63
- if (actual.identity_hash !== expected.identity_hash) throw new Error(REVIEW_RUNTIME_INCOMPATIBLE);
64
- }
65
-
66
- export function setLoadedReviewRuntimeIdentityForTesting(identity: LoadedReviewRuntimeIdentityV1 | undefined): void {
67
- testIdentity = identity;
68
- }
package/prompts/gcl.md DELETED
@@ -1,54 +0,0 @@
1
- ---
2
- description: Audit changelog entries before release
3
- ---
4
- Audit changelog entries for all commits since the last release.
5
-
6
- ## Process
7
-
8
- 1. **Find the last release tag:**
9
- ```bash
10
- git tag --sort=-version:refname | head -1
11
- ```
12
-
13
- 2. **List all commits since that tag:**
14
- ```bash
15
- git log <tag>..HEAD --oneline
16
- ```
17
-
18
- 3. **Read each package's [Unreleased] section:**
19
- - packages/ai/CHANGELOG.md
20
- - packages/tui/CHANGELOG.md
21
- - packages/coding-agent/CHANGELOG.md
22
-
23
- 4. **For each commit, check:**
24
- - Skip: changelog updates, doc-only changes, release housekeeping
25
- - Skip: changes to generated model catalogs (for example `packages/ai/src/models.generated.ts`) unless accompanied by an intentional product-facing change in non-generated source/docs.
26
- - Determine which package(s) the commit affects (use `git show <hash> --stat`)
27
- - Verify a changelog entry exists in the affected package(s)
28
- - For external contributions (PRs), verify format: `Description ([#N](url) by [@user](url))`
29
-
30
- 5. **Cross-package duplication rule:**
31
- Changes in `ai`, `agent` or `tui` that affect end users should be duplicated to `coding-agent` changelog, since coding-agent is the user-facing package that depends on them.
32
-
33
- 6. **Add New Features section after changelog fixes:**
34
- - Insert a `### New Features` section at the start of `## [Unreleased]` in `packages/coding-agent/CHANGELOG.md`.
35
- - Propose the top new features to the user for confirmation before writing them.
36
- - Link to relevant docs and sections whenever possible.
37
-
38
- 7. **Report:**
39
- - List commits with missing entries
40
- - List entries that need cross-package duplication
41
- - Add any missing entries directly
42
-
43
- ## Changelog Format Reference
44
-
45
- Sections (in order):
46
- - `### Breaking Changes` - API changes requiring migration
47
- - `### Added` - New features
48
- - `### Changed` - Changes to existing functionality
49
- - `### Fixed` - Bug fixes
50
- - `### Removed` - Removed features
51
-
52
- Attribution:
53
- - Internal: `Fixed foo ([#123](https://github.com/earendil-works/pi-mono/issues/123))`
54
- - External: `Added bar ([#456](https://github.com/earendil-works/pi-mono/pull/456) by [@user](https://github.com/user))`
package/prompts/gis.md DELETED
@@ -1,25 +0,0 @@
1
- ---
2
- description: Analyze GitHub issues (bugs or feature requests)
3
- argument-hint: "<issue>"
4
- ---
5
- Analyze GitHub issue(s): $ARGUMENTS
6
-
7
- For each issue:
8
-
9
- 1. Add the `inprogress` label to the issue via GitHub CLI before analysis starts. If adding the label fails, report that explicitly and continue.
10
- 2. Read the issue in full, including all comments and linked issues/PRs.
11
- 3. Do not trust analysis written in the issue. Independently verify behavior and derive your own analysis from the code and execution path.
12
-
13
- 4. **For bugs**:
14
- - Ignore any root cause analysis in the issue (likely wrong)
15
- - Read all related code files in full (no truncation)
16
- - Trace the code path and identify the actual root cause
17
- - Propose a fix
18
-
19
- 5. **For feature requests**:
20
- - Do not trust implementation proposals in the issue without verification
21
- - Read all related code files in full (no truncation)
22
- - Propose the most concise implementation approach
23
- - List affected files and changes needed
24
-
25
- Do NOT implement unless explicitly asked. Analyze and propose only.
package/prompts/gpr.md DELETED
@@ -1,41 +0,0 @@
1
- ---
2
- description: Review PRs from URLs with structured issue and code analysis
3
- argument-hint: "<PR-URL>"
4
- ---
5
- You are given one or more GitHub PR URLs: $@
6
-
7
- For each PR URL, do the following in order:
8
- 1. Add the `inprogress` label to the PR via GitHub CLI before analysis starts. If adding the label fails, report that explicitly and continue.
9
- 2. Read the PR page in full. Include description, all comments, all commits, and all changed files.
10
- 3. Identify any linked issues referenced in the PR body, comments, commit messages, or cross links. Read each issue in full, including all comments.
11
- 4. Analyze the PR diff. Read all relevant code files in full with no truncation from the current main branch and compare against the diff. Do not fetch PR file blobs unless a file is missing on main or the diff context is insufficient. Include related code paths that are not in the diff but are required to validate behavior.
12
- 5. Check for a changelog entry in the relevant `packages/*/CHANGELOG.md` files. Report whether an entry exists. If missing, state that a changelog entry is required before merge and that you will add it if the user decides to merge. Follow the changelog format rules in AGENTS.md. Verify:
13
- - Entry uses correct section (`### Breaking Changes`, `### Added`, `### Fixed`, etc.)
14
- - External contributions include PR link and author: `Fixed foo ([#123](https://github.com/earendil-works/pi-mono/pull/123) by [@user](https://github.com/user))`
15
- - Breaking changes are in `### Breaking Changes`, not just `### Fixed`
16
- 6. Check if packages/coding-agent/README.md, packages/coding-agent/docs/*.md, packages/coding-agent/examples/**/*.md require modification. This is usually the case when existing features have been changed, or new features have been added.
17
- 7. Provide a structured review with these sections:
18
- - Good: solid choices or improvements
19
- - Bad: concrete issues, regressions, missing tests, or risks
20
- - Ugly: subtle or high impact problems
21
- 8. Add Questions or Assumptions if anything is unclear.
22
- 9. Add Change summary and Tests.
23
-
24
- Output format per PR:
25
- PR: <url>
26
- Changelog:
27
- - ...
28
- Good:
29
- - ...
30
- Bad:
31
- - ...
32
- Ugly:
33
- - ...
34
- Questions or Assumptions:
35
- - ...
36
- Change summary:
37
- - ...
38
- Tests:
39
- - ...
40
-
41
- If no issues are found, say so under Bad and Ugly.
package/prompts/gwr.md DELETED
@@ -1,31 +0,0 @@
1
- ---
2
- description: Finish the current task end-to-end with changelog, commit, and push
3
- argument-hint: "[instructions]"
4
- ---
5
- Wrap it.
6
-
7
- Additional instructions: $ARGUMENTS
8
-
9
- Determine context from the conversation history first.
10
-
11
- Rules for context detection:
12
- - If the conversation already mentions a GitHub issue or PR, use that existing context.
13
- - If the work came from `/is` or `/pr`, assume the issue or PR context is already known from the conversation and from the analysis work already done.
14
- - If there is no GitHub issue or PR in the conversation history, treat this as non-GitHub work.
15
-
16
- Unless I explicitly override something in this request, do the following in order:
17
-
18
- 1. Add or update the relevant package changelog entry under `## [Unreleased]` using the repo changelog rules.
19
- 2. If this task is tied to a GitHub issue or PR and a final issue or PR comment has not already been posted in this session, draft it in my tone, preview it, and post exactly one final comment.
20
- 3. Commit only files you changed in this session.
21
- 4. If this task is tied to exactly one GitHub issue, include `closes #<issue>` in the commit message. If it is tied to multiple issues, stop and ask which one to use. If it is not tied to any issue, do not include `closes #` or `fixes #` in the commit message.
22
- 5. Check the current git branch. If it is not `main`, stop and ask what to do. Do not push from another branch unless I explicitly say so.
23
- 6. Push the current branch.
24
-
25
- Constraints:
26
- - Never stage unrelated files.
27
- - Never use `git add .` or `git add -A`.
28
- - Run required checks before committing if code changed.
29
- - Do not open a PR unless I explicitly ask.
30
- - If this is not GitHub issue or PR work, do not post a GitHub comment.
31
- - If a final issue or PR comment was already posted in this session, do not post another one unless I explicitly ask.
@@ -1,25 +0,0 @@
1
- {
2
- "schema": "gentle-ai.sdd-review-binding/v1",
3
- "revision": "sha256:9ae7d725b93eab436053ea9eb04b2d1a5bf4390dd5b10a709e64086e3c833980",
4
- "change": "native-review-authority-parity",
5
- "lineage": "issue136-contract-runtime",
6
- "authority_revision": "sha256:521b6a12b67ed75dd68b9ddb5543822c88da97a88e7257fd780b37dbedc35f8c",
7
- "receipt_hash": "sha256:50edda8e4b081e0b905592d598ffdb1b6c6edea45879715544eaeba4150c1059",
8
- "gate_context": {
9
- "gate": "post-apply",
10
- "lineage_id": "issue136-contract-runtime",
11
- "generation": 1,
12
- "store_revision": "sha256:521b6a12b67ed75dd68b9ddb5543822c88da97a88e7257fd780b37dbedc35f8c",
13
- "genesis_revision": "sha256:521b6a12b67ed75dd68b9ddb5543822c88da97a88e7257fd780b37dbedc35f8c",
14
- "chain_identity": "sha256:521b6a12b67ed75dd68b9ddb5543822c88da97a88e7257fd780b37dbedc35f8c",
15
- "bundle_digest": "sha256:521b6a12b67ed75dd68b9ddb5543822c88da97a88e7257fd780b37dbedc35f8c",
16
- "base_tree": "cb234a1435871ed095db961750b8bb944fadbd43",
17
- "candidate_tree": "3f8acce95a176230e45398698722eaee3091d625",
18
- "paths_digest": "sha256:0cc3964e29bb296c5f17bc496325961ed0df989b5333ac20d05770776a34be52",
19
- "fix_delta_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
20
- "policy_hash": "sha256:34fb63d7f29f8613cd4431382b1057398a4816f8a4c20fc34677fffc80a184f6",
21
- "ledger_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
22
- "evidence_hash": "sha256:2fa17828f842a4043ff7be11e4f439f40c6b06e1275538b6b4c800a27446f9d9",
23
- "base_relationship_valid": true
24
- }
25
- }
@@ -1,8 +0,0 @@
1
- {
2
- "operation": "review/finalize",
3
- "lineage_id": "lineage-1",
4
- "state": "approved",
5
- "action": "validate delivery with gentle-ai review validate --gate \u003cgate\u003e",
6
- "store_revision": "sha256:7a0fde32ddb4f17b77120c9c2a940c700ab5f8a7730b5e207c631b3a38b58f2c",
7
- "receipt_path": "/tmp/gentle-ai-v212-finalize-UsUFIr/.git/gentle-ai/review-transactions/v2/lineage-1/review-receipt.json"
8
- }
@@ -1,139 +0,0 @@
1
- {
2
- "schemaName": "gentle-ai.sdd-status",
3
- "schemaVersion": 1,
4
- "changeName": "native-review-authority-parity",
5
- "artifactStore": "engram",
6
- "planningHome": {
7
- "mode": "repo-local",
8
- "path": "engram:sdd"
9
- },
10
- "changeRoot": "engram:sdd/native-review-authority-parity",
11
- "artifactPaths": {
12
- "proposal": [
13
- "sdd/native-review-authority-parity/proposal"
14
- ],
15
- "specs": [
16
- "sdd/native-review-authority-parity/spec"
17
- ],
18
- "design": [
19
- "sdd/native-review-authority-parity/design"
20
- ],
21
- "tasks": [
22
- "sdd/native-review-authority-parity/tasks"
23
- ],
24
- "applyProgress": [],
25
- "verifyReport": [],
26
- "reviewPolicy": [
27
- "sdd/native-review-authority-parity/review/policy"
28
- ],
29
- "reviewLedger": [],
30
- "reviewReceipt": [],
31
- "reviewBundle": [],
32
- "reviewContext": [],
33
- "reviewState": []
34
- },
35
- "contextFiles": {
36
- "proposal": [
37
- "sdd/native-review-authority-parity/proposal"
38
- ],
39
- "specs": [
40
- "sdd/native-review-authority-parity/spec"
41
- ],
42
- "design": [
43
- "sdd/native-review-authority-parity/design"
44
- ],
45
- "tasks": [
46
- "sdd/native-review-authority-parity/tasks"
47
- ],
48
- "applyProgress": [],
49
- "verifyReport": [],
50
- "reviewPolicy": [
51
- "sdd/native-review-authority-parity/review/policy"
52
- ],
53
- "reviewLedger": [],
54
- "reviewReceipt": [],
55
- "reviewBundle": [],
56
- "reviewContext": [],
57
- "reviewState": []
58
- },
59
- "artifacts": {
60
- "applyProgress": "missing",
61
- "design": "done",
62
- "proposal": "done",
63
- "reviewBundle": "missing",
64
- "reviewContext": "missing",
65
- "reviewLedger": "missing",
66
- "reviewPolicy": "done",
67
- "reviewReceipt": "missing",
68
- "reviewState": "missing",
69
- "specs": "done",
70
- "tasks": "done",
71
- "verifyReport": "missing"
72
- },
73
- "taskProgress": {
74
- "total": 1,
75
- "completed": 0,
76
- "pending": 1,
77
- "allComplete": false
78
- },
79
- "dependencies": {
80
- "proposal": "all_done",
81
- "specs": "all_done",
82
- "design": "all_done",
83
- "tasks": "all_done",
84
- "apply": "ready",
85
- "verify": "blocked",
86
- "archive": "blocked"
87
- },
88
- "applyState": "ready",
89
- "actionContext": {
90
- "mode": "repo-local",
91
- "workspaceRoot": "/tmp/gentle-ai-v212-engram-1f17zo",
92
- "allowedEditRoots": [
93
- "/tmp/gentle-ai-v212-engram-1f17zo"
94
- ]
95
- },
96
- "relationships": {
97
- "dependsOn": [],
98
- "supersedes": [],
99
- "amends": [],
100
- "conflictsWith": [],
101
- "sameDomainActiveChanges": []
102
- },
103
- "remediationState": {
104
- "required": false,
105
- "complete": false,
106
- "failedEvidenceRevision": "",
107
- "lineageId": "",
108
- "generation": 0,
109
- "fixBatch": 0,
110
- "reason": ""
111
- },
112
- "phaseInstructions": {
113
- "apply": [
114
- "Change: native-review-authority-parity",
115
- "State: ready",
116
- "Read proposal, specs, design, and tasks before editing.",
117
- "Implement only unchecked tasks and update tasks.md checkboxes as work completes."
118
- ],
119
- "verify": [
120
- "Change: native-review-authority-parity",
121
- "State: blocked",
122
- "Verify implementation against proposal, specs, design, and task completion.",
123
- "Run final verification only after every task is complete; apply-progress never makes final verification ready."
124
- ],
125
- "remediate": [
126
- "Change: native-review-authority-parity",
127
- "Remediation is allowed only when the persisted review transaction has remaining mode-specific budget.",
128
- "Bind focused tests, runtime harness evidence, and rollback evidence to the exact failed evidence revision.",
129
- "A bare remediation envelope or stale failed revision never completes remediation."
130
- ],
131
- "archive": [
132
- "Change: native-review-authority-parity",
133
- "State: blocked",
134
- "Archive only when verify-report.md exists and every task checkbox is complete."
135
- ]
136
- },
137
- "nextRecommended": "apply",
138
- "blockedReasons": []
139
- }