@plainconceptsplatform/workflows 1.3.0 → 1.3.1

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 (36) hide show
  1. package/loops/actions/add-issue-labels/action.yml +50 -50
  2. package/loops/actions/agent-output.cjs +17 -17
  3. package/loops/actions/apply-agent-bundle/action.yml +24 -24
  4. package/loops/actions/apply-agent-comments/action.yml +42 -42
  5. package/loops/actions/apply-agent-labels/action.yml +55 -55
  6. package/loops/actions/apply-agent-output/action.yml +108 -108
  7. package/loops/actions/cleanup-artifacts/action.yml +91 -91
  8. package/loops/actions/close-agent-issues/action.yml +43 -43
  9. package/loops/actions/create-agent-issues/action.yml +52 -52
  10. package/loops/actions/create-issue-comment/action.yml +29 -29
  11. package/loops/actions/download-agent-output/action.yml +53 -53
  12. package/loops/actions/link-pr-to-issue/action.yml +40 -40
  13. package/loops/actions/list-open-issues/action.yml +33 -33
  14. package/loops/actions/load-issue-context/action.yml +45 -45
  15. package/loops/actions/merge-agent-pr/action.yml +49 -49
  16. package/loops/actions/push-agent-branch/action.yml +45 -45
  17. package/loops/actions/remove-issue-labels/action.yml +37 -37
  18. package/loops/actions/update-agent-issues/action.yml +58 -58
  19. package/loops/actions/validate-merge-gate-output/action.yml +6 -1
  20. package/loops/actions/validate-merge-gate-output/validate-merge-gate-output.sh +9 -2
  21. package/loops/actions/validate-review-output/action.yml +35 -35
  22. package/loops/actions/validate-triage-output/action.yml +36 -36
  23. package/loops/actions/verify-composite-actions/action.yml +9 -9
  24. package/loops/actions/verify-refine-output/action.yml +9 -9
  25. package/loops/actions/verify-route-matrix/action.yml +9 -9
  26. package/loops/actions/verify-route-matrix/verify-route-matrix.sh +10 -2
  27. package/loops/templates/agentics/agentics-maintenance.yml +121 -121
  28. package/loops/templates/issues/bug_report.yml +109 -109
  29. package/loops/templates/issues/feature_request.yml +75 -75
  30. package/loops/templates/release/github-release.yml +30 -30
  31. package/loops/workflows/agent-apply-review.md +5 -0
  32. package/loops/workflows/agent-implement.md +6 -0
  33. package/loops/workflows/agent-merge-gate.md +62 -2
  34. package/loops/workflows/authorize-bot-work.yml +105 -105
  35. package/loops/workflows/shared/platform-defaults.md +23 -23
  36. package/package.json +1 -1
@@ -1,109 +1,109 @@
1
- name: Bug report
2
- description: Report a defect
3
- labels: ["bug"]
4
- body:
5
- - type: markdown
6
- attributes:
7
- value: |
8
- Thanks for reporting. Do **not** include real secrets or production data use placeholders.
9
-
10
- For security vulnerabilities, contact the team directly instead of filing a public issue.
11
- - type: dropdown
12
- id: severity
13
- attributes:
14
- label: Severity
15
- options:
16
- - Production-down / data loss
17
- - Major broken core flow
18
- - Minor broken edge case
19
- - Cosmetic / polish
20
- validations:
21
- required: true
22
- - type: dropdown
23
- id: frequency
24
- attributes:
25
- label: Frequency
26
- description: How often does this happen?
27
- options:
28
- - Always
29
- - Intermittent
30
- - Only once
31
- validations:
32
- required: true
33
- - type: textarea
34
- id: what-happened
35
- attributes:
36
- label: What happened?
37
- description: A clear description of the bug and its impact.
38
- validations:
39
- required: true
40
- - type: textarea
41
- id: repro
42
- attributes:
43
- label: Steps to reproduce
44
- description: How can a maintainer reproduce it?
45
- placeholder: |
46
- 1. Go to ...
47
- 2. Do ...
48
- 3. See error
49
- validations:
50
- required: true
51
- - type: textarea
52
- id: expected
53
- attributes:
54
- label: Expected behavior
55
- validations:
56
- required: true
57
- - type: dropdown
58
- id: area
59
- attributes:
60
- label: Where does it occur?
61
- options:
62
- - Backend
63
- - Frontend
64
- - Both
65
- - CLI / tooling
66
- - Configuration / deployment
67
- - Documentation
68
- - Other
69
- validations:
70
- required: true
71
- - type: textarea
72
- id: acceptance
73
- attributes:
74
- label: Acceptance criteria
75
- description: How will we know it's fixed? A checklist a reviewer can verify (include the test that should turn green).
76
- placeholder: |
77
- - [ ] ...
78
- - [ ] A test that fails before the fix and passes after
79
- validations:
80
- required: false
81
- - type: textarea
82
- id: open-questions
83
- attributes:
84
- label: Open questions
85
- description: Decisions a maintainer must make before this can be planned. Leave blank if none.
86
- validations:
87
- required: false
88
- - type: textarea
89
- id: environment
90
- attributes:
91
- label: Environment
92
- description: Local vs deployed, branch/commit, OS, runtime versions if relevant.
93
- validations:
94
- required: false
95
- - type: textarea
96
- id: logs
97
- attributes:
98
- label: Logs / screenshots
99
- description: Paste relevant logs or screenshots. Redact secrets and PII.
100
- render: shell
101
- validations:
102
- required: false
103
- - type: textarea
104
- id: related
105
- attributes:
106
- label: Related links
107
- description: Links to related issues, PRs, discussions, or docs. Leave blank if none.
108
- validations:
109
- required: false
1
+ name: Bug report
2
+ description: Report a defect
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for reporting. Do **not** include real secrets or production data use placeholders.
9
+
10
+ For security vulnerabilities, contact the team directly instead of filing a public issue.
11
+ - type: dropdown
12
+ id: severity
13
+ attributes:
14
+ label: Severity
15
+ options:
16
+ - Production-down / data loss
17
+ - Major broken core flow
18
+ - Minor broken edge case
19
+ - Cosmetic / polish
20
+ validations:
21
+ required: true
22
+ - type: dropdown
23
+ id: frequency
24
+ attributes:
25
+ label: Frequency
26
+ description: How often does this happen?
27
+ options:
28
+ - Always
29
+ - Intermittent
30
+ - Only once
31
+ validations:
32
+ required: true
33
+ - type: textarea
34
+ id: what-happened
35
+ attributes:
36
+ label: What happened?
37
+ description: A clear description of the bug and its impact.
38
+ validations:
39
+ required: true
40
+ - type: textarea
41
+ id: repro
42
+ attributes:
43
+ label: Steps to reproduce
44
+ description: How can a maintainer reproduce it?
45
+ placeholder: |
46
+ 1. Go to ...
47
+ 2. Do ...
48
+ 3. See error
49
+ validations:
50
+ required: true
51
+ - type: textarea
52
+ id: expected
53
+ attributes:
54
+ label: Expected behavior
55
+ validations:
56
+ required: true
57
+ - type: dropdown
58
+ id: area
59
+ attributes:
60
+ label: Where does it occur?
61
+ options:
62
+ - Backend
63
+ - Frontend
64
+ - Both
65
+ - CLI / tooling
66
+ - Configuration / deployment
67
+ - Documentation
68
+ - Other
69
+ validations:
70
+ required: true
71
+ - type: textarea
72
+ id: acceptance
73
+ attributes:
74
+ label: Acceptance criteria
75
+ description: How will we know it's fixed? A checklist a reviewer can verify (include the test that should turn green).
76
+ placeholder: |
77
+ - [ ] ...
78
+ - [ ] A test that fails before the fix and passes after
79
+ validations:
80
+ required: false
81
+ - type: textarea
82
+ id: open-questions
83
+ attributes:
84
+ label: Open questions
85
+ description: Decisions a maintainer must make before this can be planned. Leave blank if none.
86
+ validations:
87
+ required: false
88
+ - type: textarea
89
+ id: environment
90
+ attributes:
91
+ label: Environment
92
+ description: Local vs deployed, branch/commit, OS, runtime versions if relevant.
93
+ validations:
94
+ required: false
95
+ - type: textarea
96
+ id: logs
97
+ attributes:
98
+ label: Logs / screenshots
99
+ description: Paste relevant logs or screenshots. Redact secrets and PII.
100
+ render: shell
101
+ validations:
102
+ required: false
103
+ - type: textarea
104
+ id: related
105
+ attributes:
106
+ label: Related links
107
+ description: Links to related issues, PRs, discussions, or docs. Leave blank if none.
108
+ validations:
109
+ required: false
@@ -1,75 +1,75 @@
1
- name: Feature request
2
- description: Propose a small improvement or new capability
3
- labels: ["enhancement"]
4
- body:
5
- - type: markdown
6
- attributes:
7
- value: |
8
- This template is for small, well-scoped improvements a focused
9
- enhancement, a missing convenience, a quality-of-life fix.
10
-
11
- For large features, architecture changes, or cross-cutting work,
12
- open a planning issue or an ADR instead.
13
-
14
- Do **not** include real secrets or production data use placeholders.
15
- - type: dropdown
16
- id: scope
17
- attributes:
18
- label: Scope
19
- description: How big is this change? If it doesn't fit Small or Medium, use a planning issue instead.
20
- options:
21
- - Small a single file or component, no refactoring
22
- - Medium touches a few files or a feature area, may need minor refactoring
23
- validations:
24
- required: true
25
- - type: textarea
26
- id: current-behavior
27
- attributes:
28
- label: Current behavior
29
- description: How does it work today? Describe the existing behavior or limitation.
30
- validations:
31
- required: true
32
- - type: textarea
33
- id: problem
34
- attributes:
35
- label: Problem / motivation
36
- description: What user or business need does this address? Why is the current behavior a problem?
37
- validations:
38
- required: true
39
- - type: textarea
40
- id: proposal
41
- attributes:
42
- label: Proposed solution
43
- description: What would you like to happen?
44
- validations:
45
- required: true
46
- - type: textarea
47
- id: alternatives
48
- attributes:
49
- label: Alternatives considered
50
- validations:
51
- required: false
52
- - type: textarea
53
- id: acceptance
54
- attributes:
55
- label: Acceptance criteria
56
- description: A checklist a reviewer can verify when this is done (include the tests).
57
- placeholder: |
58
- - [ ] ...
59
- - [ ] Tests
60
- validations:
61
- required: false
62
- - type: textarea
63
- id: open-questions
64
- attributes:
65
- label: Open questions
66
- description: Decisions a maintainer must make before this can be planned. Leave blank if none.
67
- validations:
68
- required: false
69
- - type: textarea
70
- id: related
71
- attributes:
72
- label: Related links
73
- description: Links to related issues, PRs, discussions, or docs. Leave blank if none.
74
- validations:
75
- required: false
1
+ name: Feature request
2
+ description: Propose a small improvement or new capability
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ This template is for small, well-scoped improvements a focused
9
+ enhancement, a missing convenience, a quality-of-life fix.
10
+
11
+ For large features, architecture changes, or cross-cutting work,
12
+ open a planning issue or an ADR instead.
13
+
14
+ Do **not** include real secrets or production data use placeholders.
15
+ - type: dropdown
16
+ id: scope
17
+ attributes:
18
+ label: Scope
19
+ description: How big is this change? If it doesn't fit Small or Medium, use a planning issue instead.
20
+ options:
21
+ - Small a single file or component, no refactoring
22
+ - Medium touches a few files or a feature area, may need minor refactoring
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: current-behavior
27
+ attributes:
28
+ label: Current behavior
29
+ description: How does it work today? Describe the existing behavior or limitation.
30
+ validations:
31
+ required: true
32
+ - type: textarea
33
+ id: problem
34
+ attributes:
35
+ label: Problem / motivation
36
+ description: What user or business need does this address? Why is the current behavior a problem?
37
+ validations:
38
+ required: true
39
+ - type: textarea
40
+ id: proposal
41
+ attributes:
42
+ label: Proposed solution
43
+ description: What would you like to happen?
44
+ validations:
45
+ required: true
46
+ - type: textarea
47
+ id: alternatives
48
+ attributes:
49
+ label: Alternatives considered
50
+ validations:
51
+ required: false
52
+ - type: textarea
53
+ id: acceptance
54
+ attributes:
55
+ label: Acceptance criteria
56
+ description: A checklist a reviewer can verify when this is done (include the tests).
57
+ placeholder: |
58
+ - [ ] ...
59
+ - [ ] Tests
60
+ validations:
61
+ required: false
62
+ - type: textarea
63
+ id: open-questions
64
+ attributes:
65
+ label: Open questions
66
+ description: Decisions a maintainer must make before this can be planned. Leave blank if none.
67
+ validations:
68
+ required: false
69
+ - type: textarea
70
+ id: related
71
+ attributes:
72
+ label: Related links
73
+ description: Links to related issues, PRs, discussions, or docs. Leave blank if none.
74
+ validations:
75
+ required: false
@@ -1,30 +1,30 @@
1
- # Managed by @plainconceptsplatform/workflows. Source: loops/templates/release/github-release.yml. Update with `workflows update --force`; consumer edits may be overwritten.
2
- name: Publish GitHub release
3
-
4
- on:
5
- push:
6
- tags:
7
- - "v*"
8
-
9
- permissions:
10
- contents: write
11
-
12
- jobs:
13
- publish:
14
- name: Publish release
15
- runs-on: ubuntu-latest
16
- timeout-minutes: 10
17
- steps:
18
- - name: Create or update GitHub release
19
- env:
20
- GH_TOKEN: ${{ github.token }}
21
- TAG: ${{ github.ref_name }}
22
- shell: bash
23
- run: |
24
- set -euo pipefail
25
-
26
- if gh release view "$TAG" >/dev/null 2>&1; then
27
- gh release edit "$TAG" --title "$TAG" --generate-notes
28
- else
29
- gh release create "$TAG" --title "$TAG" --generate-notes
30
- fi
1
+ # Managed by @plainconceptsplatform/workflows. Source: loops/templates/release/github-release.yml. Update with `workflows update --force`; consumer edits may be overwritten.
2
+ name: Publish GitHub release
3
+
4
+ on:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ permissions:
10
+ contents: write
11
+
12
+ jobs:
13
+ publish:
14
+ name: Publish release
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 10
17
+ steps:
18
+ - name: Create or update GitHub release
19
+ env:
20
+ GH_TOKEN: ${{ github.token }}
21
+ TAG: ${{ github.ref_name }}
22
+ shell: bash
23
+ run: |
24
+ set -euo pipefail
25
+
26
+ if gh release view "$TAG" >/dev/null 2>&1; then
27
+ gh release edit "$TAG" --title "$TAG" --generate-notes
28
+ else
29
+ gh release create "$TAG" --title "$TAG" --generate-notes
30
+ fi
@@ -541,6 +541,11 @@ timeout-minutes: 90
541
541
  ${{ env.VERIFY_COMMANDS }}
542
542
  ```
543
543
 
544
+ When `.opencode/scripts/check-diff.mjs` exists, also run
545
+ `node .opencode/scripts/check-diff.mjs`.
546
+ It must exit 0: delete the comments and tests it lists. The merge gate runs it too and does not
547
+ merge while it fails.
548
+
544
549
  7. Select one review outcome.
545
550
 
546
551
  - **implemented**: You made the requested change, verification passed, and you will propose
@@ -707,6 +707,12 @@ timeout-minutes: 180
707
707
 
708
708
  Never open a pull request that does not pass them.
709
709
 
710
+ When `.opencode/scripts/check-diff.mjs` exists, also run
711
+ `node .opencode/scripts/check-diff.mjs`
712
+ on both paths. It must exit 0. It holds the comments and tests you add to the size of the
713
+ change and makes you clean the files you touched; fix every line it lists. The merge gate
714
+ runs it again and does not merge while it fails.
715
+
710
716
  5. Do not touch `changelog.json`. The workflow records the change itself once the work is on
711
717
  the default branch. Every implement used to edit that one file, so two runs whose branches
712
718
  were cut before the other merged conflicted on it and failed to open a pull request with the
@@ -131,7 +131,9 @@ on:
131
131
  # this entry activation read needs.protected_changes.outputs.requires_review before
132
132
  # protected_changes had started; the value was '' and the clause was always true
133
133
  # (Pliny-Bot run 34042143350: activation finished 18 s before protected_changes began).
134
- needs: [protected_changes]
134
+ # code_rules is here for the same reason: the prompt prints its result and report, and the
135
+ # prompt is rendered in activation.
136
+ needs: [protected_changes, code_rules]
135
137
 
136
138
  # Rung 4. Router has classified the event; identify-gate-subject validates PR ownership,
137
139
  # resolves the closing issue, and confirms the CI verdict.
@@ -240,6 +242,51 @@ jobs:
240
242
  medium-lines: ${{ env.BLAST_MEDIUM_LINES }}
241
243
  ignore-paths: ${{ env.BLAST_IGNORE_PATHS }}
242
244
 
245
+ # Rung 4c. The comments and tests the change adds, measured by the harness's check-diff on the
246
+ # pull request head before any model reads it. Prose in the implement prompt did not hold bot
247
+ # pull requests to the guardrails: they added 27-63% comment lines in October 2026. `fail`
248
+ # stops an auto-merge in the validator; the agent is told to repair it like a CI failure.
249
+ # A repository without the script reports `absent` and is not held to it.
250
+ code_rules:
251
+ needs: subject
252
+ if: needs.subject.outputs.found == 'true'
253
+ runs-on: agents-arc
254
+ timeout-minutes: 10
255
+ permissions:
256
+ contents: read
257
+ outputs:
258
+ result: ${{ steps.check.outputs.result }}
259
+ report: ${{ steps.check.outputs.report }}
260
+ steps:
261
+ - name: Checkout the pull request
262
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
263
+ with:
264
+ ref: refs/pull/${{ needs.subject.outputs.pr }}/head
265
+ fetch-depth: 0
266
+ persist-credentials: false
267
+ - name: Check the comments and tests it adds
268
+ id: check
269
+ env:
270
+ BASE: origin/${{ github.event.repository.default_branch || 'main' }}
271
+ run: |
272
+ set -uo pipefail
273
+ if [ ! -f .opencode/scripts/check-diff.mjs ]; then
274
+ echo "result=absent" >> "$GITHUB_OUTPUT"
275
+ echo "check-diff is not installed (agent-harness 3.2.0 or later ships it), so comments and tests were not checked." >> "$GITHUB_STEP_SUMMARY"
276
+ exit 0
277
+ fi
278
+ report=$(node .opencode/scripts/check-diff.mjs --base "$BASE" 2>&1)
279
+ code=$?
280
+ case "$code" in 0) result=pass ;; 1) result=fail ;; *) result=error ;; esac
281
+ delimiter="EOF_$(openssl rand -hex 8)"
282
+ {
283
+ echo "result=$result"
284
+ echo "report<<$delimiter"
285
+ printf '%s\n' "${report:0:8000}"
286
+ echo "$delimiter"
287
+ } >> "$GITHUB_OUTPUT"
288
+ printf '```\n%s\n```\n' "$report" >> "$GITHUB_STEP_SUMMARY"
289
+
243
290
  review_required:
244
291
  needs: [subject, protected_changes]
245
292
  # gh-aw makes the agent depend on custom jobs. Keep this job successful when
@@ -362,7 +409,7 @@ jobs:
362
409
  Problems found in PR #${{ needs.subject.outputs.pr }}. ${{ steps.conflicts.outputs.has_conflicts == 'true' && 'Merge conflicts detected.' || 'CI failed.' }}
363
410
  Bot is working on fixing it.
364
411
  validate_output:
365
- needs: [activation, subject, protected_changes, agent, safe_outputs]
412
+ needs: [activation, subject, protected_changes, code_rules, agent, safe_outputs]
366
413
  if: >
367
414
  always() &&
368
415
  needs.agent.result == 'success' &&
@@ -396,6 +443,7 @@ jobs:
396
443
  protected-hit: ${{ needs.protected_changes.outputs.requires_review }}
397
444
  owner-hit: ${{ needs.protected_changes.outputs.owner_hit }}
398
445
  confidence-threshold: ${{ env.CONFIDENCE_THRESHOLD }}
446
+ code-rules: ${{ needs.code_rules.outputs.result }}
399
447
  conclude:
400
448
  needs: [activation, subject, protected_changes, agent, safe_outputs, validate_output]
401
449
  # `protected_changes.result == 'success'` is stated rather than relied on. GitHub skips a job
@@ -854,6 +902,18 @@ timeout-minutes: 120
854
902
  ${{ needs.protected_changes.outputs.signals }}
855
903
  ```
856
904
 
905
+ **Comments and tests (`check-diff`): `${{ needs.code_rules.outputs.result }}`**
906
+
907
+ ```
908
+ ${{ needs.code_rules.outputs.report }}
909
+ ```
910
+
911
+ When that is `fail`, repairing it is part of this run whatever CI concluded: delete the
912
+ comments and tests it lists, leave every file it names with no slop, run
913
+ `node .opencode/scripts/check-diff.mjs`
914
+ until it exits 0, then verify, push and report `remediated` as in step 6. An `assessed`
915
+ verdict while it fails blocks the pull request.
916
+
857
917
  - **success** → step 4, then step 5 (review the change).
858
918
  - **failure** → step 4, then step 6 (CI remediation).
859
919
  - **action_required, cancelled, timed_out, or anything else** → CI did not produce a usable