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,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,13 +4,15 @@ 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 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 replaces ordinary 4R as the adversarial method for that target; never run both.
15
+
14
16
  Judgment Day starts only when explicitly requested and replaces ordinary review for that lineage.
15
17
 
16
18
  ## Transaction Rules
@@ -25,6 +27,8 @@ Initial discovery and scoped re-judgment are separate modes.
25
27
 
26
28
  During initial discovery, run exactly once against the supplied `initial_review_tree` and return candidate rows only.
27
29
 
30
+ 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.
31
+
28
32
  During initial discovery, do not persist state, mutate claims, launch actors, request fixes, validate fixes, or deliver anything.
29
33
 
30
34
  On controller-requested scoped re-judgment, receive only requested frozen IDs, their exact hash-bound rows, and the fix diff.
@@ -59,6 +63,8 @@ Each scoped fix returns candidate-tree and fix-diff evidence. It cannot mint aut
59
63
 
60
64
  ## Lifecycle Boundary
61
65
 
66
+ A judgment issues no receipt and carries no delivery authority: it satisfies no commit, push, PR, or release gate. When the caller explicitly wants delivery authority for the same target, run the ordinary negotiated review lifecycle as its own step; a runtime that cannot uphold receipt guarantees loses the receipt, not the judgment.
67
+
62
68
  Pre-commit, pre-push, and PR gates validate approved receipts and exact typed targets with zero actors.
63
69
  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
70
  Major and post-incident releases require explicit extraordinary review even when fast-path checks pass.
@@ -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
+ - Check the user-owned RDD kill switch first. When disabled, do not start receipt reviews or fabricate approval; follow ordinary policy and report `disabled/unmanaged`.
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
+ - Only when RDD is enabled, bind receipts, lineage, correction, recovery, and delivery gates to the exact candidate. Keep bounded review defects in one correction transaction.
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
+ | RDD disabled | Ordinary policy; `disabled/unmanaged`; no receipt or approval claim. |
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.