gentle-pi 2.1.2 → 2.3.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 (228) hide show
  1. package/README.md +108 -79
  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 -3
  7. package/assets/agents/review-reliability.md +4 -3
  8. package/assets/agents/review-resilience.md +4 -3
  9. package/assets/agents/review-risk.md +4 -3
  10. package/assets/agents/sdd-apply.md +11 -4
  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 +8 -1
  17. package/assets/agents/sdd-research.md +54 -0
  18. package/assets/agents/sdd-spec.md +6 -1
  19. package/assets/agents/sdd-status.md +10 -5
  20. package/assets/agents/sdd-sync.md +6 -1
  21. package/assets/agents/sdd-tasks.md +8 -4
  22. package/assets/agents/sdd-verify.md +27 -2
  23. package/assets/chains/4r-review.chain.md +2 -0
  24. package/assets/chains/sdd-full.chain.md +2 -2
  25. package/assets/chains/sdd-plan.chain.md +1 -1
  26. package/assets/chains/sdd-verify.chain.md +2 -2
  27. package/assets/orchestrator-delegation.md +145 -160
  28. package/assets/orchestrator-memory.md +2 -0
  29. package/assets/orchestrator.md +25 -48
  30. package/assets/sdd-orchestrator-workflow.md +163 -25
  31. package/assets/support/sdd-status-contract.md +24 -6
  32. package/contracts/review-integration/v1/fixtures/consent.fixture.json +3 -3
  33. package/contracts/review-integration/v1/fixtures/start-v2.fixture.json +19 -28
  34. package/contracts/review-integration/v1/fixtures/start.fixture.json +1 -10
  35. package/contracts/review-integration/v1/fixtures/status-v2.fixture.json +12 -21
  36. package/contracts/review-integration/v1/schemas/correction-plan-request.schema.json +49 -0
  37. package/contracts/review-integration/v1/schemas/operation.schema.json +76 -0
  38. package/contracts/review-integration/v1/schemas/repair.schema.json +39 -0
  39. package/contracts/review-integration/v1/schemas/status-v2.schema.json +4 -2
  40. package/contracts/review-integration/v1/schemas/status.schema.json +4 -2
  41. package/contracts/review-integration/v1/schemas/transition-execution.schema.json +42 -0
  42. package/contracts/review-integration/v2/fixtures/consent.fixture.json +1 -1
  43. package/contracts/review-integration/v2/fixtures/start.fixture.json +1 -10
  44. package/contracts/review-integration/v2/fixtures/status.fixture.json +1 -10
  45. package/contracts/review-integration/v2/schemas/failure.schema.json +5 -1
  46. package/contracts/review-integration/v2/schemas/last-event-closure.schema.json +66 -0
  47. package/contracts/review-integration/v2/schemas/opencode-provider-role.schema.json +14 -0
  48. package/contracts/review-integration/v2/schemas/operation.schema.json +6 -1
  49. package/contracts/review-integration/v2/schemas/repair.schema.json +4 -2
  50. package/contracts/review-integration/v2/schemas/start.schema.json +5 -2
  51. package/contracts/review-integration/v2/schemas/status.schema.json +4 -2
  52. package/contracts/review-provider-contract-mirror/provider-contract.lock.json +30 -0
  53. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/README.md +12 -0
  54. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/manifest.json +65 -0
  55. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/lens.schema.json +16 -0
  56. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/refuter.schema.json +1 -0
  57. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/schemas/targeted-validator.schema.json +1 -0
  58. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/lens.json +1 -0
  59. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/refuter.json +1 -0
  60. package/contracts/review-provider-contract-mirror/v1.1.0/bundle/vectors/targeted-validator.json +1 -0
  61. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-capabilities.baseline.json +15 -0
  62. package/contracts/review-provider-contract-mirror/v1.1.0/generated/provider-roles.baseline.json +42 -0
  63. package/docs/native-authority-architecture.md +14 -16
  64. package/docs/review-integration.md +27 -353
  65. package/extensions/ask-user-choice.ts +151 -0
  66. package/extensions/gentle-ai.ts +2710 -3211
  67. package/extensions/quiet-tools.ts +515 -32
  68. package/extensions/sdd-init.ts +21 -12
  69. package/extensions/skill-registry.ts +10 -2
  70. package/extensions/startup-banner.ts +10 -4
  71. package/lib/gentle-ai-binary.ts +173 -2
  72. package/lib/gentle-ai-renderer.ts +70 -0
  73. package/lib/model-routing-authority.ts +133 -0
  74. package/lib/native-review-cli.ts +676 -781
  75. package/lib/opaque-pi-reviewer-adapter.ts +284 -0
  76. package/lib/provider-contract-bundle.ts +704 -0
  77. package/lib/review-candidate-view.ts +836 -118
  78. package/lib/review-compact-contract.ts +59 -248
  79. package/lib/review-host-relay.ts +578 -0
  80. package/lib/review-integration-v2.ts +1254 -221
  81. package/lib/review-last-event-controller.ts +35 -0
  82. package/lib/review-relay-contract.ts +16 -0
  83. package/lib/sdd-preflight.ts +230 -67
  84. package/lib/sdd-status.ts +66 -111
  85. package/lib/terminal-theme.ts +1 -1
  86. package/package.json +83 -79
  87. package/runtime/gentle-ai-binary.mjs +174 -3
  88. package/runtime/native-review-cli.mjs +610 -715
  89. package/runtime/review-integration-v2.mjs +1223 -190
  90. package/runtime/review-relay-contract.mjs +17 -0
  91. package/scripts/{build-git-commit-transaction-runner.mjs → build-runtime-modules.mjs} +5 -5
  92. package/scripts/check-provider-contract.mjs +138 -0
  93. package/scripts/gentle-ai-installer.mjs +85 -22
  94. package/scripts/maintainer/provider-relay-matrix.mjs +403 -0
  95. package/scripts/mirror-provider-contract.mjs +143 -0
  96. package/scripts/test-packed-runner.mjs +20 -9
  97. package/scripts/verify-package-files.mjs +119 -43
  98. package/skills/_shared/review-ledger-contract.md +11 -19
  99. package/skills/chained-pr/SKILL.md +3 -0
  100. package/skills/cognitive-doc-design/SKILL.md +1 -1
  101. package/skills/comment-writer/SKILL.md +1 -1
  102. package/skills/gentle-ai/SKILL.md +7 -74
  103. package/skills/issue-creation/SKILL.md +94 -168
  104. package/skills/judgment-day/SKILL.md +9 -5
  105. package/skills/judgment-day/references/prompts-and-formats.md +2 -0
  106. package/skills/rdd-defect-workflow/SKILL.md +54 -0
  107. package/skills/release/SKILL.md +3 -3
  108. package/skills/skill-registry/SKILL.md +1 -1
  109. package/skills/work-unit-commits/SKILL.md +3 -1
  110. package/tests/artifact-language.test.ts +24 -11
  111. package/tests/ask-user-choice.test.ts +264 -0
  112. package/tests/background-subagents.test.ts +771 -0
  113. package/tests/codegraph-tools.test.ts +3 -3
  114. package/tests/crosslane/cross-lane.mjs +16 -0
  115. package/tests/delegated-key-learnings-contract.test.ts +240 -0
  116. package/tests/devbinary/native-review-parity.devtest.ts +167 -250
  117. package/tests/devbinary/pi-host-relay.devtest.ts +867 -0
  118. package/tests/fixtures/devbinary/capabilities-v2.1.derived.json +331 -0
  119. package/tests/fixtures/devbinary/capabilities-v2.2.captured.json +340 -0
  120. package/tests/fixtures/devbinary/consent-v3.captured.json +37 -0
  121. package/tests/fixtures/devbinary/failure-v2-capture-evidence.captured.json +16 -0
  122. package/tests/fixtures/devbinary/last-event-capture-correction-plan.captured.json +10 -0
  123. package/tests/fixtures/devbinary/last-event-capture-refuter-approved.captured.json +20 -0
  124. package/tests/fixtures/devbinary/last-event-capture-refuter-correction-required.captured.json +26 -0
  125. package/tests/fixtures/devbinary/last-event-capture-result-approved.captured.json +8 -0
  126. package/tests/fixtures/devbinary/last-event-capture-result-correction-required.captured.json +26 -0
  127. package/tests/fixtures/devbinary/last-event-capture-validation-approved.captured.json +8 -0
  128. package/tests/fixtures/devbinary/last-event-closure.provenance.md +13 -0
  129. package/tests/fixtures/devbinary/result-artifact-v2-path.captured.json +12 -0
  130. package/tests/fixtures/devbinary/result-artifact-v2.captured.json +12 -0
  131. package/tests/fixtures/devbinary/review-acknowledged-v1.captured.json +9 -0
  132. package/tests/fixtures/devbinary/review-acknowledged.provenance.md +31 -0
  133. package/tests/fixtures/devbinary/start-v3-consent-declined.captured.json +19 -0
  134. package/tests/fixtures/devbinary/start-v3-consent-granted.captured.json +109 -0
  135. package/tests/fixtures/devbinary/start-v3-zero-lens-closed.captured.json +21 -0
  136. package/tests/fixtures/devbinary/status-v5-capture-result-submission.captured.json +184 -0
  137. package/tests/fixtures/devbinary/status-v5-repository-context.captured.json +138 -0
  138. package/tests/fixtures/devbinary/status-v5.captured.json +88 -0
  139. package/tests/fixtures/native-review-cli/v2.5.0-rc.1/PROVENANCE.txt +15 -0
  140. package/tests/fixtures/provider-contract-bundle/v1.1.0/README.md +12 -0
  141. package/tests/fixtures/provider-contract-bundle/v1.1.0/manifest.json +65 -0
  142. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/lens.schema.json +16 -0
  143. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/refuter.schema.json +1 -0
  144. package/tests/fixtures/provider-contract-bundle/v1.1.0/schemas/targeted-validator.schema.json +1 -0
  145. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/lens.json +1 -0
  146. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/refuter.json +1 -0
  147. package/tests/fixtures/provider-contract-bundle/v1.1.0/vectors/targeted-validator.json +1 -0
  148. package/tests/gentle-ai-binary.test.ts +83 -13
  149. package/tests/gentle-ai-dev-binary-surfacing.test.ts +195 -0
  150. package/tests/gentle-ai-dev-binary.test.ts +159 -0
  151. package/tests/gentle-ai-installer.test.ts +138 -48
  152. package/tests/gentle-ai.test.ts +820 -131
  153. package/tests/gentle-theme.test.ts +133 -0
  154. package/tests/maintainer/provider-relay.maintest.ts +601 -0
  155. package/tests/model-routing-authority.test.ts +257 -0
  156. package/tests/native-review-capability-contract.test.ts +75 -2
  157. package/tests/native-review-cli.test.ts +588 -908
  158. package/tests/native-review-consent.test.ts +283 -38
  159. package/tests/native-review-parity-runtime.test.ts +108 -350
  160. package/tests/native-review-parity.test.ts +684 -732
  161. package/tests/native-sdd-attempt-authority.test.ts +235 -0
  162. package/tests/opaque-pi-reviewer-adapter.test.ts +266 -0
  163. package/tests/orchestrator-budget.test.ts +158 -89
  164. package/tests/orchestrator-rdd-ownership.test.ts +103 -0
  165. package/tests/package-manifest.test.ts +128 -100
  166. package/tests/provider-contract-bundle.test.ts +385 -0
  167. package/tests/provider-contract-mirror.test.ts +206 -0
  168. package/tests/provider-defect-handoff.test.ts +252 -0
  169. package/tests/quiet-tool-rendering.test.ts +1055 -28
  170. package/tests/review-actor-tool-deny.test.ts +12 -13
  171. package/tests/review-authority-recovery-docs.test.ts +1 -2
  172. package/tests/review-candidate-view.test.ts +898 -12
  173. package/tests/review-compact-contract.test.ts +29 -122
  174. package/tests/review-controller-lock-status.test.ts +2 -2
  175. package/tests/review-controller-native-recovery.test.ts +366 -857
  176. package/tests/review-controller-native-routing.test.ts +1253 -4199
  177. package/tests/review-controller-retired-ops.test.ts +1 -1
  178. package/tests/review-controller-workspace-root.test.ts +236 -70
  179. package/tests/review-controller.test.ts +26 -816
  180. package/tests/review-corrected-finalize-binding.test.ts +134 -0
  181. package/tests/review-dispatch-hydration-gap.test.ts +145 -0
  182. package/tests/review-gate.test.ts +0 -45
  183. package/tests/review-host-relay-restart-parity.test.ts +360 -0
  184. package/tests/review-host-relay-routing.test.ts +352 -0
  185. package/tests/review-host-relay.test.ts +754 -0
  186. package/tests/review-integration-v2-forward.test.ts +654 -0
  187. package/tests/review-integration-v2.test.ts +317 -129
  188. package/tests/review-last-event-closure.test.ts +408 -0
  189. package/tests/review-ledger-contract.test.ts +106 -60
  190. package/tests/review-recovered-lineage-routing.test.ts +199 -0
  191. package/tests/review-relay-transport-agent.test.ts +322 -0
  192. package/tests/review-snapshot.test.ts +3 -2
  193. package/tests/runtime-harness.mjs +573 -180
  194. package/tests/sdd-agent-tools.test.ts +53 -32
  195. package/tests/sdd-preflight.test.ts +81 -15
  196. package/tests/sdd-status.test.ts +109 -110
  197. package/tests/skill-collision-prefixes.test.ts +6 -8
  198. package/tests/skill-registry.test.ts +50 -1
  199. package/tests/verify-package-files.test.ts +62 -0
  200. package/tests/writer-edit-surface-scope.test.ts +230 -0
  201. package/themes/Gentleman-Cute.json +94 -0
  202. package/themes/Gentleman-Sexy.json +92 -0
  203. package/assets/agents/review-refuter.md +0 -40
  204. package/assets/agents/review-validator.md +0 -23
  205. package/lib/git-commit-transaction.ts +0 -801
  206. package/lib/native-review-remediation.ts +0 -49
  207. package/lib/review-compact.ts +0 -947
  208. package/lib/review-refuter-adapter.ts +0 -129
  209. package/lib/review-runtime-contract.ts +0 -68
  210. package/prompts/gcl.md +0 -54
  211. package/prompts/gis.md +0 -25
  212. package/prompts/gpr.md +0 -41
  213. package/prompts/gwr.md +0 -31
  214. package/runtime/git-commit-transaction.mjs +0 -802
  215. package/scripts/run-git-commit-transaction.mjs +0 -35
  216. package/tests/fixtures/native-review-cli/v2.1.2/bind-sdd.json +0 -25
  217. package/tests/fixtures/native-review-cli/v2.1.2/finalize.json +0 -8
  218. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status-engram.json +0 -139
  219. package/tests/fixtures/native-review-cli/v2.1.2/sdd-status.json +0 -200
  220. package/tests/fixtures/native-review-cli/v2.1.2/start.json +0 -12
  221. package/tests/fixtures/native-review-cli/v2.1.2/validate-allow.json +0 -24
  222. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny-empty-context.json +0 -20
  223. package/tests/fixtures/native-review-cli/v2.1.2/validate-deny.json +0 -28
  224. package/tests/fixtures/native-review-cli/v2.1.3/sdd-status-engram.json +0 -139
  225. package/tests/fixtures/native-review-cli/v2.1.3/sdd-status.json +0 -200
  226. package/tests/git-commit-transaction.test.ts +0 -302
  227. package/tests/review-compact.test.ts +0 -243
  228. package/tests/review-refuter-adapter.test.ts +0 -89
@@ -1,223 +1,149 @@
1
1
  ---
2
2
  name: gentle-ai-issue-creation
3
- description: "Create Gentle AI issues with issue-first checks. Trigger: creating GitHub issues, bug reports, or feature requests."
3
+ description: "Create and triage GitHub issues from repository evidence. Trigger: issue creation, bug reports, feature requests, or issue approval."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: gentleman-programming
7
- version: "1.0"
7
+ version: "1.2"
8
8
  ---
9
9
 
10
- ## When to Use
10
+ # Issue Creation
11
11
 
12
- Use this skill when:
13
- - Creating a GitHub issue (bug report or feature request)
14
- - Helping a contributor file an issue
15
- - Triaging or approving issues as a maintainer
12
+ ## When To Use
16
13
 
17
- ---
14
+ Use this skill when creating, drafting, triaging, or approving an issue in the current GitHub repository.
18
15
 
19
- ## Critical Rules
16
+ ## Core Rule
20
17
 
21
- 1. **Blank issues are disabled** — MUST use a template (bug report or feature request)
22
- 2. **Every issue gets `status:needs-review` automatically** on creation
23
- 3. **A maintainer MUST add `status:approved`** before any PR can be opened
24
- 4. **Questions go to [Discussions](https://github.com/Gentleman-Programming/agent-teams-lite/discussions)**, not issues
18
+ Discover the repository's actual contribution workflow before proposing or publishing an issue. Templates, labels, approval gates, and Discussions support are repository policy, not universal GitHub behavior.
25
19
 
26
- ---
20
+ ## Safe Discovery
27
21
 
28
- ## Workflow
22
+ Run read-only checks first:
29
23
 
24
+ ```bash
25
+ gh auth status
26
+ REPO="$(gh repo view --json nameWithOwner -q .nameWithOwner)"
27
+ REPO_URL="$(gh repo view --json url -q .url)"
28
+ HOST="${REPO_URL#*://}"
29
+ HOST="${HOST%%/*}"
30
+ gh repo view --json nameWithOwner,url,hasDiscussionsEnabled,hasIssuesEnabled,isBlankIssuesEnabled
31
+ git ls-files CONTRIBUTING.md CONTRIBUTING.* .github/CONTRIBUTING.md .github/ISSUE_TEMPLATE
32
+ gh api --hostname "$HOST" --paginate "repos/$REPO/labels?per_page=100" --jq '.[].name'
30
33
  ```
31
- 1. Search existing issues for duplicates
32
- 2. Choose the correct template (Bug Report or Feature Request)
33
- 3. Fill in ALL required fields
34
- 4. Check pre-flight checkboxes
35
- 5. Submit → issue gets status:needs-review automatically
36
- 6. Wait for maintainer to add status:approved
37
- 7. Only then open a PR linking this issue
38
- ```
39
-
40
- ---
41
-
42
- ## Issue Templates
43
34
 
44
- ### Bug Report
35
+ Also inspect:
45
36
 
46
- Template: `.github/ISSUE_TEMPLATE/bug_report.yml`
47
- Auto-labels: `bug`, `status:needs-review`
37
+ - repository instructions such as `CONTRIBUTING.md` and `README.md`;
38
+ - files under `.github/ISSUE_TEMPLATE`;
39
+ - `.github/ISSUE_TEMPLATE/config.yml` when present;
40
+ - issue forms, required fields, and labels declared by each template;
41
+ - existing open and closed issues for duplicates and established wording.
48
42
 
49
- #### Required Fields
43
+ Stop and ask for repository context if authentication, repository resolution, verification that REPO and HOST are non-empty, required metadata is unavailable, hasIssuesEnabled is false, or policy discovery fails. Never continue from failed discovery into issue publication.
50
44
 
51
- | Field | Description |
52
- |-------|-------------|
53
- | **Pre-flight Checks** | Checkboxes: no duplicate + understands approval workflow |
54
- | **Bug Description** | Clear description of the bug |
55
- | **Steps to Reproduce** | Numbered steps to reproduce |
56
- | **Expected Behavior** | What should have happened |
57
- | **Actual Behavior** | What happened instead (include errors/logs) |
58
- | **Operating System** | Dropdown: macOS, Linux variants, Windows, WSL |
59
- | **Agent / Client** | Dropdown: Claude Code, OpenCode, Gemini CLI, Cursor, Windsurf, Codex, Other |
60
- | **Shell** | Dropdown: bash, zsh, fish, Other |
45
+ A no-template fallback is allowed only when isBlankIssuesEnabled is explicitly true. Otherwise follow discovered contact links or stop and ask; never publish.
61
46
 
62
- #### Optional Fields
63
-
64
- | Field | Description |
65
- |-------|-------------|
66
- | **Relevant Logs** | Log output (auto-formatted as code block) |
67
- | **Additional Context** | Screenshots, workarounds, extra info |
68
-
69
- #### Example — Bug Report via CLI
47
+ After discovery and review, build optional label arguments using only labels that exist and repository policy permits the actor to apply:
70
48
 
71
49
  ```bash
72
- gh issue create --template "bug_report.yml" \
73
- --title "fix(scripts): setup.sh fails on zsh with glob error" \
74
- --body "
75
- ### Pre-flight Checks
76
- - [x] I have searched existing issues and this is not a duplicate
77
- - [x] I understand this issue needs status:approved before a PR can be opened
78
-
79
- ### Bug Description
80
- Running setup.sh on zsh throws a glob error when no matching files exist.
81
-
82
- ### Steps to Reproduce
83
- 1. Clone the repo
84
- 2. Run \`./scripts/setup.sh\` in zsh
85
- 3. See error: \`zsh: no matches found: skills/*\`
86
-
87
- ### Expected Behavior
88
- The script should handle missing glob matches gracefully.
89
-
90
- ### Actual Behavior
91
- Script crashes with glob error.
50
+ LABEL_ARGS=()
51
+ # Repeat for each reviewed, permitted discovered label.
52
+ LABEL_ARGS+=(--label "$LABEL")
53
+ ```
92
54
 
93
- ### Operating System
94
- macOS
55
+ An empty array applies no label; do not invent labels.
95
56
 
96
- ### Agent / Client
97
- Claude Code
57
+ ## Workflow
98
58
 
99
- ### Shell
100
- zsh
59
+ 1. Describe the problem or request in one sentence and derive a short search query.
60
+ 2. Search open and closed issues:
101
61
 
102
- ### Relevant Logs
103
- \`\`\`
104
- zsh: no matches found: skills/*
105
- \`\`\`
106
- "
107
- ```
62
+ ```bash
63
+ gh issue list --repo "$HOST/$REPO" --state all --search "$QUERY" --limit 1000
64
+ ```
108
65
 
109
- ---
66
+ If 1000 results are returned or completeness remains uncertain, narrow the search, use read-only API discovery, or stop and ask before publishing.
110
67
 
111
- ### Feature Request
68
+ 3. If an issue already covers the same behavior, comment there instead of creating a duplicate.
69
+ 4. Choose a repository-provided template only when its purpose matches the report.
70
+ 5. Fill every required template field from known evidence. Ask for missing facts rather than inventing them.
71
+ 6. Apply labels only when they exist and repository guidance establishes who should apply them.
72
+ 7. Publish only after the title, body, target repository, and selected template or fallback have been reviewed, and the pre-submission privacy review below has passed.
112
73
 
113
- Template: `.github/ISSUE_TEMPLATE/feature_request.yml`
114
- Auto-labels: `enhancement`, `status:needs-review`
74
+ ## Pre-submission Privacy Review
115
75
 
116
- #### Required Fields
76
+ Pre-submission privacy review is mandatory. Scan every issue body immediately before `gh issue create`. The scan replaces — never deletes — environment-specific data with explicit placeholders so the reproduction still teaches:
117
77
 
118
- | Field | Description |
119
- |-------|-------------|
120
- | **Pre-flight Checks** | Checkboxes: no duplicate + understands approval workflow |
121
- | **Problem Description** | The pain point this feature solves |
122
- | **Proposed Solution** | How it should work from the user's perspective |
123
- | **Affected Area** | Dropdown: Scripts, Skills, Examples, Documentation, CI/Workflows, Other |
78
+ | Category | Replace with | Example (before → after) |
79
+ |----------|---------------|---------------------------|
80
+ | Private project names | `<project-name>` | `my-private-project-b` → `<project-name>` |
81
+ | Usernames | `<user>` | `C:\Users\my-real-username\go\bin` → `C:\Users\<user>\go\bin` |
82
+ | Hostnames | `<hostname>` | `devbox-macbook.local` → `<hostname>` |
83
+ | Home paths | `/home/<user>` or `C:\Users\<user>` | (covered above) |
84
+ | API keys, tokens, passwords | `<token>` / `<password>` | `ghp_abc123...` → `<token>` |
85
+ | Internal ports / hostnames | `<host>:<port>` | `10.0.0.42:5432` → `<host>:<port>` |
124
86
 
125
- #### Optional Fields
87
+ Do NOT redact intentionally public identifiers: tool names (`gentle-ai`, `engram`, `go`, `node`, `python`), package names, public documentation URLs, generic example domains (`example.com`, `localhost`). Keep reproduction structure with placeholders — never redact an example into nothingness.
126
88
 
127
- | Field | Description |
128
- |-------|-------------|
129
- | **Alternatives Considered** | Other approaches or workarounds |
130
- | **Additional Context** | Mockups, examples, references |
89
+ **Rule of thumb:** if the reader can run the reproduction step after you replace every identifier with its placeholder, the sanitization is correct. If a step becomes impossible (because the placeholder consumed a needed value), that step needs the value — and you should mark it `<value-required>` and explain in the body what the user should fill in.
131
90
 
132
- #### Example — Feature Request via CLI
91
+ ## Template Paths
133
92
 
134
- ```bash
135
- gh issue create --template "feature_request.yml" \
136
- --title "feat(scripts): add Codex support to setup.sh" \
137
- --body "
138
- ### Pre-flight Checks
139
- - [x] I have searched existing issues and this is not a duplicate
140
- - [x] I understand this issue needs status:approved before a PR can be opened
141
-
142
- ### Problem Description
143
- The setup script only configures Claude Code, Gemini CLI, and OpenCode. Codex users have to manually copy skills.
144
-
145
- ### Proposed Solution
146
- Add a Codex option to setup.sh that links skills to the .codex/ directory.
147
-
148
- Example:
149
- \`\`\`bash
150
- ./scripts/setup.sh --agent codex
151
- \`\`\`
152
-
153
- ### Affected Area
154
- Scripts (setup, installation)
155
-
156
- ### Alternatives Considered
157
- Manually symlinking, but that defeats the purpose of the setup script.
158
- "
159
- ```
93
+ Do not guess a template filename. If multiple templates could apply and repository guidance does not distinguish them, stop and ask which one to use.
160
94
 
161
- ---
95
+ - .yml and .yaml files are GitHub Issue Forms. Do not parse or render their schema. Open the web issue chooser and stop for human completion:
162
96
 
163
- ## Label System
97
+ ```bash
98
+ gh issue create --repo "$HOST/$REPO" --web "${LABEL_ARGS[@]}"
99
+ ```
164
100
 
165
- ### Applied Automatically on Issue Creation
101
+ - .md files are Markdown templates. Read the matching template, complete it from known evidence into a reviewed BODY_FILE, then publish it:
166
102
 
167
- | Template | Labels added |
168
- |----------|-------------|
169
- | Bug Report | `bug`, `status:needs-review` |
170
- | Feature Request | `enhancement`, `status:needs-review` |
103
+ ```bash
104
+ gh issue create --repo "$HOST/$REPO" --title "$TITLE" --body-file "$BODY_FILE" "${LABEL_ARGS[@]}"
105
+ ```
171
106
 
172
- ### Applied by Maintainers
107
+ ## No-Template Fallback
173
108
 
174
- | Label | When to apply |
175
- |-------|--------------|
176
- | `status:approved` | Issue accepted for implementation — PRs can now be opened |
177
- | `priority:high` | Critical bug or urgent feature |
178
- | `priority:medium` | Important but not blocking |
179
- | `priority:low` | Nice to have |
109
+ When the repository permits issue creation, provides no matching template, and isBlankIssuesEnabled is explicitly true, prepare a structured body with these sections:
180
110
 
181
- ---
111
+ - problem or requested outcome;
112
+ - reproduction or motivating example;
113
+ - expected behavior;
114
+ - actual behavior or current limitation;
115
+ - environment and relevant evidence;
116
+ - alternatives or workarounds, when applicable.
182
117
 
183
- ## Maintainer Approval Workflow
118
+ Publish the reviewed fallback explicitly:
184
119
 
185
- ```
186
- 1. New issue arrives with status:needs-review
187
- 2. Review the issue — is it valid, clear, and in scope?
188
- 3. If YES → add status:approved label
189
- 4. If NO → comment with reason, close if needed
190
- 5. Contributor can now open a PR linking this issue
120
+ ```bash
121
+ gh issue create --repo "$HOST/$REPO" --title "$TITLE" --body "$BODY" "${LABEL_ARGS[@]}"
191
122
  ```
192
123
 
193
- ---
124
+ If blank issues are not explicitly enabled, follow discovered contact links or stop and ask. Never publish a no-template fallback.
194
125
 
195
- ## Decision Tree
126
+ ## Labels And Approval
196
127
 
197
- ```
198
- Is it a bug? → Use Bug Report template
199
- Is it a new feature/improvement? → Use Feature Request template
200
- Is it a question? → Use Discussions, NOT issues
201
- Is it a duplicate? → Link to existing issue, close
202
- ```
128
+ Treat labels and approval gates as conditional:
203
129
 
204
- ---
130
+ - use only labels returned by repository discovery;
131
+ - follow contribution guidance for who may apply each label;
132
+ - wait when repository policy requires maintainer approval before implementation;
133
+ - do not invent a status or priority taxonomy when none is documented.
205
134
 
206
- ## Commands
135
+ ## Questions And Discussions
207
136
 
208
- ```bash
209
- # Search existing issues before creating
210
- gh issue list --search "keyword"
137
+ Use Discussions only when `hasDiscussionsEnabled` is true and repository guidance routes the question there. Otherwise follow documented support/contact links or ask the user where the question belongs. Never link to another repository's Discussions page.
211
138
 
212
- # Create bug report
213
- gh issue create --template "bug_report.yml" --title "fix(scope): description"
139
+ ## Triage Decision
214
140
 
215
- # Create feature request
216
- gh issue create --template "feature_request.yml" --title "feat(scope): description"
141
+ Before approving or closing an issue, verify:
217
142
 
218
- # Maintainer: approve an issue
219
- gh issue edit <number> --add-label "status:approved"
143
+ - it describes a concrete bug or scoped improvement rather than an unsupported question;
144
+ - it is not a duplicate;
145
+ - the report contains enough evidence for an implementation decision;
146
+ - the requested behavior is in repository scope;
147
+ - labels and status changes follow the current repository's policy.
220
148
 
221
- # Maintainer: add priority
222
- gh issue edit <number> --add-label "priority:high"
223
- ```
149
+ If any point is uncertain, keep the issue in the repository's review state and request the smallest missing evidence.
@@ -4,14 +4,18 @@ description: "Trigger: judgment day, judgement day, dual review, adversarial rev
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: gentleman-programming
7
- version: "1.4"
7
+ version: "1.7"
8
8
  ---
9
9
 
10
10
  ## Activation Contract
11
11
 
12
12
  Load this skill only when the user explicitly requests Judgment Day, Judgement Day, dual/adversarial review, or an equivalent trigger. Resolve one exact target before starting.
13
13
 
14
- Judgment Day starts only when explicitly requested and replaces ordinary review for that lineage.
14
+ Judgment Day is a standalone developer tool: judges run whenever asked, on any runtime, and need no review transaction, runtime identity, or delivery-receipt machinery to start. It neither enables nor replaces an ordinary 4R lifecycle; a separately requested ordinary review remains independent.
15
+
16
+ Judgment Day starts only when explicitly requested. It does not start, configure, or consume ordinary review for that lineage.
17
+
18
+ Historical compatibility note (obsolete): Judgment Day starts only when explicitly requested and replaces ordinary review for that lineage. Current behavior is the independent lifecycle above.
15
19
 
16
20
  ## Transaction Rules
17
21
 
@@ -25,6 +29,8 @@ Initial discovery and scoped re-judgment are separate modes.
25
29
 
26
30
  During initial discovery, run exactly once against the supplied `initial_review_tree` and return candidate rows only.
27
31
 
32
+ Judges hold a sweep budget: one exhaustive read-only sweep per judge is the standard budget, and at most two sweeps for a full-4R-scale target (hot auth/update/security/payments paths, or more than 400 changed lines). There is no loop-until-dry mechanism; the sweep budget is the entire discovery pass.
33
+
28
34
  During initial discovery, do not persist state, mutate claims, launch actors, request fixes, validate fixes, or deliver anything.
29
35
 
30
36
  On controller-requested scoped re-judgment, receive only requested frozen IDs, their exact hash-bound rows, and the fix diff.
@@ -59,9 +65,7 @@ Each scoped fix returns candidate-tree and fix-diff evidence. It cannot mint aut
59
65
 
60
66
  ## Lifecycle Boundary
61
67
 
62
- Pre-commit, pre-push, and PR gates validate approved receipts and exact typed targets with zero actors.
63
- Release from protected `main` may bypass receipt validation only when the tag targets the current immutable `origin/main` SHA, required CI for that exact SHA is successful, the remote head is rechecked before tag push, and no fresh risk evidence exists; otherwise release fails closed through native receipt validation.
64
- Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
68
+ Judgment Day is independent: it creates no delivery authority, enables no ordinary review, and changes no commit, push, PR, or release policy. A separately requested ordinary review remains an independent lifecycle and cannot consume a Judgment Day result as a receipt or authority. Ordinary repository policy owns delivery.
65
69
 
66
70
  Dangerous-command safety remains independent and authoritative.
67
71
 
@@ -23,6 +23,8 @@ Initial discovery and scoped re-judgment are separate modes.
23
23
 
24
24
  During initial discovery, run exactly once against the supplied `initial_review_tree` and return candidate rows only.
25
25
 
26
+ Run one exhaustive read-only sweep — at most two sweeps for a full-4R-scale target (hot auth/update/security/payments paths, or more than 400 changed lines). Do not edit, delegate, refute, or inspect unrelated scope.
27
+
26
28
  During initial discovery, do not persist state, mutate claims, launch actors, request fixes, validate fixes, or deliver anything.
27
29
 
28
30
  Each candidate contains stable ID, exact location, severity, evidence class, and concrete user-impact claim. WARNING and SUGGESTION are informational. Return an empty `rows` array when clean.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: gentle-ai-rdd-defect-workflow
3
+ description: "Trigger: RDD, receipt-driven development, review authority, receipt/lineage, correction/recovery, delivery gate/kill switch, bounded review defects. Guide work."
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: gentleman-programming
7
+ version: "1.0"
8
+ ---
9
+
10
+ ## Activation Contract
11
+
12
+ Load when the frontmatter trigger terms apply to a defect workflow.
13
+
14
+ This skill guides public collaboration. It does not grant issue approval, label, review, exception, or merge authority.
15
+
16
+ ## Hard Rules
17
+
18
+ - Review and Judgment Day evidence is review-only. Pi never mints delivery authority: ordinary commit, push, PR, and release always follow repository policy, regardless of RDD mode.
19
+ - Require an approved issue (`status:approved`) and clean current `main` reproduction before implementation. Audit existing PRs for supersession or conflict; stop or narrow stale claims.
20
+ - Group by causal authority invariant. Use one issue and one PR or explicit chain per independent invariant and rollback boundary. Split independent causes; never merge a superseded or conflicting authority line.
21
+ - Inventory every operator flow claimed by the issue or PR, including entry, mode, environment, expectation, and negative controls. Require one truthful black-box bench journey per CLI or lifecycle flow, or actual runtime E2E proof when the core bench cannot represent it. Synthetic proxy coverage never proves another runtime.
22
+ - Use CodeGraph-first impact mapping, a dedicated worktree, and behavior-first tests. Run source-mutating normalization before candidate freeze.
23
+ - Forecast authored changes before edits. The hard limit is 400 additions plus deletions; above it, STOP for a chain or explicit maintainer-approved exception.
24
+ - When RDD is enabled, bind review receipts, lineage, correction, and recovery evidence to the exact candidate. Keep bounded review defects in one correction transaction; never treat that evidence as delivery authority.
25
+ - Require independent read-only candidate validation before publication. Validation cannot edit source or authority; findings require a new candidate.
26
+ - Keep communication humane and evidence-based. Repository labels and workflow metadata are maintainer-owned, never evidence of contributor blame.
27
+
28
+ ## Decision Gates
29
+
30
+ | Condition | Action |
31
+ | --- | --- |
32
+ | Any RDD mode | Review evidence remains review-only; ordinary commit, push, PR, and release follow repository policy with no Pi delivery authority. |
33
+ | Issue gate or reproduction fails | Wait, stop, or narrow with evidence. |
34
+ | Invariant or rollback is independent | Separate issue and authoritative PR line. |
35
+ | Core bench fits / does not fit | Bench journey / actual runtime E2E; never proxy. |
36
+ | Forecast exceeds 400 lines | Chain or approved exception before edits. |
37
+
38
+ ## Execution Steps
39
+
40
+ 1. Check mode, approval, PR conflicts, and current-main reproduction.
41
+ 2. Name invariant and rollback; isolate the worktree; CodeGraph-map code, tests, evidence, docs, distribution, and registration.
42
+ 3. Inventory flows and controls; add failing tests and the smallest correction.
43
+ 4. Normalize, enforce budget, run tests, and record each flow's exact candidate, command, scenario, and result.
44
+ 5. Freeze, validate read-only, and give the verdict, evidence, and one humane next action.
45
+
46
+ ## Output Contract
47
+
48
+ Return `rdd_mode`, `issue_pr`, `causal_invariant`, `operator_flows`, `journey_runtime_evidence`, `changed_line_budget`, `tests`, `rollback`, and `unresolved_authority_decisions`.
49
+
50
+ Identify approved and superseded/conflicting authority lines; every flow, negative control, and candidate-bound proof; additions plus deletions and chain/exception; test results; independent rollback; and unresolved maintainer decisions.
51
+
52
+ ## References
53
+
54
+ No supporting files. Current repository policy remains authoritative.
@@ -17,8 +17,8 @@ Use this skill when preparing, publishing, or verifying a `gentle-pi` release.
17
17
  - npm publishing MUST go through the GitHub Actions workflow `.github/workflows/publish.yml` so provenance, environment protection, and registry credentials are controlled by GitHub.
18
18
  - Dispatch the trusted workflow definition from protected default `main`, never from a release tag. Its only caller input is the exact annotated version tag.
19
19
  - Use a clean worktree for release commits. Do not package unrelated local files or scratch artifacts.
20
- - Validate the approved receipt against the exact immutable release target with zero review actors before publication.
21
- - Release from protected `main` may bypass receipt validation only when the tag targets the current immutable `origin/main` SHA, required CI for that exact SHA is successful, the remote head is rechecked before tag push, and no fresh risk evidence exists; otherwise fail closed through native receipt validation. Never infer the tag target from local `HEAD`. Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
20
+ - Review outcomes are informational. Release delivery follows ordinary repository policy and must not be blocked, authorized, or rewritten by RDD.
21
+ - Never infer the release tag target from local `HEAD`; use the freshly fetched `origin/main` commit and the repository's normal release safeguards.
22
22
  - Never skip package verification. The publish workflow runs verification again, but local validation should still pass before tagging.
23
23
 
24
24
  ## Release Procedure
@@ -114,7 +114,7 @@ Use this skill when preparing, publishing, or verifying a `gentle-pi` release.
114
114
 
115
115
  ## Failure Handling
116
116
 
117
- - A publication failure never reopens the closed review lineage. Diagnose and retry publication separately without resetting review counters.
117
+ - A publication failure is handled through ordinary repository policy. It does not reopen or alter a review lineage.
118
118
  - Never attempt or retry `npm publish` locally. Re-dispatch from trusted `main` only when the same tag still targets the current remote `main` and the failure was publication-only.
119
119
  - If remote `main` advances, do not move or recreate the existing tag. Prepare a new release commit/version and create a new annotated version tag.
120
120
  - If the workflow fails, inspect logs with:
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: skill-registry
2
+ name: gentle-ai-skill-registry
3
3
  description: "Trigger: update skills, skill registry, actualizar skills, after skill changes. Index available skills by trigger and path."
4
4
  license: MIT
5
5
  metadata:
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: work-unit-commits
2
+ name: gentle-ai-work-unit-commits
3
3
  description: "Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code."
4
4
  license: Apache-2.0
5
5
  metadata:
@@ -30,6 +30,7 @@ Use it for:
30
30
  | Tell a story | A reviewer should understand why each commit exists from its diff and message. |
31
31
  | Future PR-ready | Each commit should be a candidate chained PR when the change grows. |
32
32
  | SDD workload guard | If SDD tasks forecast a >400-line change, group commits into chained PR slices before implementation. |
33
+ | Budget is not code-golf | Never shrink a diff by deleting comments, blank lines, docs, or tests, or by compressing code, to fit the review budget (400 by default, or the session `review_budget_lines`). Slice by work unit or report the overage. |
33
34
 
34
35
  ## Work Unit Checklist
35
36
 
@@ -66,6 +67,7 @@ When `sdd-tasks` produces a Review Workload Forecast:
66
67
  - Low risk: keep work-unit commits inside one PR.
67
68
  - Medium risk: commit by work unit and monitor changed lines before PR creation.
68
69
  - High risk: follow SDD `delivery_strategy` — ask on `ask-on-risk`, auto-slice on `auto-chain`, require `size:exception` on over-budget `single-pr`, or record accepted `size:exception` on `exception-ok`.
70
+ - Splitting is bounded: after one honest slicing pass, if no cohesive work-unit split fits the budget, stop and report the smallest honest count with a `size:exception` recommendation. Do not iterate shrinking the code to reach the number.
69
71
 
70
72
  Each SDD work unit should map cleanly to a commit or PR with:
71
73
 
@@ -67,14 +67,15 @@ test("rendered SDD preflight prompt is English artifact copy", () => {
67
67
  const prefs: SddPreflightPreferences = {
68
68
  executionMode: "interactive",
69
69
  artifactStore: "openspec",
70
- chainedPrStrategy: "ask-always",
70
+ chainedPrStrategy: "ask-on-risk",
71
71
  reviewBudgetLines: 400,
72
72
  engramAvailable: false,
73
73
  prompted: true,
74
74
  };
75
75
  const prompt = renderSddPreflightPrompt(prefs);
76
76
 
77
- assert.match(prompt, /The user already chose these SDD preferences/);
77
+ assert.match(prompt, /These SDD preferences are explicit current-session choices/);
78
+ assert.match(prompt, /Delivery strategy: ask-on-risk/);
78
79
  assert.match(prompt, /Review budget: 400 changed lines/);
79
80
  assert.match(prompt, /complete only the current SDD phase/i);
80
81
  assert.match(prompt, /Do not start the next SDD phase/i);
@@ -82,9 +83,15 @@ test("rendered SDD preflight prompt is English artifact copy", () => {
82
83
  assert.match(prompt, /offer the user a proposal question round/i);
83
84
  assert.match(prompt, /business rules, implications, impact, edge cases/i);
84
85
  assert.match(prompt, /second question round/i);
86
+ assert.match(prompt, /explicit acceptance of `size:exception`/);
87
+ assert.match(prompt, /human-controlled consent, authorization, security, destructive\/publishing/);
85
88
  for (const pattern of SPANISH_PREFLIGHT_COPY) {
86
89
  assert.doesNotMatch(prompt, pattern);
87
90
  }
91
+
92
+ const headless = renderSddPreflightPrompt({ ...prefs, executionMode: "auto", prompted: false });
93
+ assert.match(headless, /canonical defaults or persisted choices/);
94
+ assert.match(headless, /ambiguous-scope/);
88
95
  });
89
96
 
90
97
  test("orchestrator Memory Contract carries the Engram memory lifecycle rule", async () => {
@@ -159,7 +166,12 @@ test("orchestrator lazy-loads detailed SDD workflow", async () => {
159
166
  const workflow = await readFile(join(ROOT, "assets/sdd-orchestrator-workflow.md"), "utf8");
160
167
 
161
168
  assert.match(orchestrator, /## SDD Workflow \(lazy-loaded\)/);
162
- assert.match(orchestrator, /\{\{GENTLE_PI_SDD_WORKFLOW_PATH\}\}/);
169
+ assert.match(orchestrator, /Package assets root: `\{\{GENTLE_PI_ASSETS_ROOT\}\}`\. Lazy asset paths below are relative to this root\./);
170
+ assert.match(orchestrator, /`sdd-orchestrator-workflow\.md`/);
171
+ assert.doesNotMatch(orchestrator, /\{\{GENTLE_PI_SDD_WORKFLOW_PATH\}\}/);
172
+ assert.match(orchestrator, /injected `## SDD Session Preflight` block or a canonical-authority resolution/);
173
+ assert.match(orchestrator, /Defaults and capability constraints may resolve fields without confirmation prompts/);
174
+ assert.doesNotMatch(orchestrator, /or an explicit user answer covering the preflight choices/);
163
175
  assert.doesNotMatch(orchestrator, /## Native SDD Dispatcher/);
164
176
  assert.match(workflow, /## Native SDD Dispatcher/);
165
177
  assert.match(workflow, /## SDD Status Contract/);
@@ -188,7 +200,7 @@ test("persistent harness prompt assets do not hardcode Spanish SDD artifact copy
188
200
  assert.deepEqual(failures, []);
189
201
  });
190
202
 
191
- test("SDD assets define ownership markers and yield post-apply lifecycle to the parent", async () => {
203
+ test("SDD assets route completed implementation directly through verify, sync, and archive", async () => {
192
204
  const [tasks, apply, status, contract, chain] = await Promise.all([
193
205
  readFile(join(ROOT, "assets/agents/sdd-tasks.md"), "utf8"),
194
206
  readFile(join(ROOT, "assets/agents/sdd-apply.md"), "utf8"),
@@ -196,15 +208,16 @@ test("SDD assets define ownership markers and yield post-apply lifecycle to the
196
208
  readFile(join(ROOT, "assets/support/sdd-status-contract.md"), "utf8"),
197
209
  readFile(join(ROOT, "assets/chains/sdd-full.chain.md"), "utf8"),
198
210
  ]);
211
+ const assets = [tasks, apply, status, contract, chain].join("\n");
199
212
 
200
213
  assert.match(tasks, /<!-- sdd-owner: implementation -->/);
201
- assert.match(tasks, /<!-- sdd-owner: parent -->/);
202
- assert.match(apply, /only implementation-owned/);
203
- assert.match(apply, /MUST NOT start bounded-review/);
204
- assert.match(status, /malformed/i);
205
- assert.match(contract, /deferredParentActions/);
206
- assert.match(contract, /parent-lifecycle/);
207
- assert.match(chain, /parent.lifecycle/i);
214
+ assert.match(apply, /next_recommended: "sdd-verify"/);
215
+ assert.match(status, /verify.*ready/i);
216
+ assert.match(contract, /apply.*verify.*sync.*archive/is);
217
+ assert.match(chain, /apply.*verification/is);
218
+ assert.doesNotMatch(assets, /<!-- sdd-owner: parent -->/);
219
+ assert.doesNotMatch(assets, /parent-lifecycle/);
220
+ assert.doesNotMatch(assets, /approved receipt|bounded review/i);
208
221
  assert.doesNotMatch(chain, /## sdd-review/);
209
222
  });
210
223