@plainconceptsplatform/workflows 0.6.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -88
- package/dist/catalog-installation.d.ts +39 -2
- package/dist/catalog-installation.js +172 -109
- package/dist/index.js +128 -73
- package/dist/package-baseline.d.ts +25 -0
- package/dist/package-baseline.js +138 -0
- package/dist/route-processing.d.ts +0 -2
- package/dist/route-processing.js +22 -91
- package/dist/stack-defaults.js +18 -12
- package/dist/tui.js +27 -43
- package/dist/worker-env.d.ts +46 -0
- package/dist/worker-env.js +179 -0
- package/dist/workflow-catalog.d.ts +4 -2
- package/dist/workflow-catalog.js +5 -3
- package/loops/actions/add-issue-labels/action.yml +20 -0
- package/loops/actions/audit-close/action.yml +180 -128
- package/loops/actions/classify-route/classify-route.sh +8 -2
- package/loops/actions/housekeeping/action.yml +251 -0
- package/loops/actions/merge-agent-pr/action.yml +13 -0
- package/loops/actions/report-workflow-errors/action.yml +414 -0
- package/loops/actions/validate-merge-gate-output/validate-merge-gate-output.sh +13 -1
- package/loops/actions/validate-triage-output/action.yml +1 -1
- package/loops/actions/validate-triage-output/validate-triage-output.sh +9 -5
- package/loops/actions/verify-composite-actions/verify-composite-actions.sh +53 -0
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +911 -170
- package/loops/templates/agentics/agentics-error-report.yml +98 -0
- package/loops/templates/opencode/opencode.ci.json +1 -1
- package/loops/workflows/agent-apply-review.md +438 -469
- package/loops/workflows/agent-audit.md +200 -213
- package/loops/workflows/agent-implement.md +591 -640
- package/loops/workflows/agent-merge-gate.md +826 -844
- package/loops/workflows/agent-refine.md +590 -633
- package/loops/workflows/agent-release.md +244 -258
- package/loops/workflows/agent-triage.md +476 -447
- package/loops/workflows/authorize-bot-work.yml +26 -6
- package/loops/workflows/shared/platform-defaults.md +18 -1
- package/loops/workflows/work-router.yml +1185 -1038
- package/package.json +9 -8
- package/dist/action-validation.test.d.ts +0 -1
- package/dist/action-validation.test.js +0 -87
- package/dist/catalog-installation.test.d.ts +0 -1
- package/dist/catalog-installation.test.js +0 -485
- package/dist/catalog-listing.test.d.ts +0 -1
- package/dist/catalog-listing.test.js +0 -150
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -273
- package/dist/repository-inspection.test.d.ts +0 -1
- package/dist/repository-inspection.test.js +0 -77
- package/dist/route-processing.test.d.ts +0 -1
- package/dist/route-processing.test.js +0 -283
- package/dist/stack-defaults.test.d.ts +0 -1
- package/dist/stack-defaults.test.js +0 -266
- package/dist/tui.test.d.ts +0 -1
- package/dist/tui.test.js +0 -249
- package/dist/workflow-catalog.test.d.ts +0 -1
- package/dist/workflow-catalog.test.js +0 -29
- package/loops/actions/stale-recovery/action.yml +0 -288
- package/loops/actions/update-changelog/action.yml +0 -113
|
@@ -17,13 +17,22 @@ permissions:
|
|
|
17
17
|
|
|
18
18
|
jobs:
|
|
19
19
|
authorize:
|
|
20
|
-
# Only trigger for work labels from HUMANS (not bots),
|
|
21
|
-
#
|
|
20
|
+
# Only trigger for work labels from HUMANS (not bots), and only if another bot run does not
|
|
21
|
+
# already own the issue.
|
|
22
|
+
#
|
|
23
|
+
# `review` is deliberately NOT excluded. It used to be, and that made the label a one-way
|
|
24
|
+
# door: the classifier refuses to route while `review` is set, so a person adding `refine`
|
|
25
|
+
# to a parked issue got no run, no comment and no error anywhere. Triage's own
|
|
26
|
+
# needs-maintainer verdict tells the maintainer to add `refine`, which could not work.
|
|
27
|
+
#
|
|
28
|
+
# A person adding a work label IS the human review the label was waiting for, so this
|
|
29
|
+
# workflow clears it below before handing the issue to the bot. The classifier's own guard
|
|
30
|
+
# stays as it is: it exists to stop the *bot* re-triggering itself, and by the time
|
|
31
|
+
# bot-working is added `review` is already gone.
|
|
22
32
|
if: >
|
|
23
33
|
(github.event.label.name == 'implement' ||
|
|
24
34
|
github.event.label.name == 'refine') &&
|
|
25
35
|
!contains(github.event.issue.labels.*.name, 'bot-working') &&
|
|
26
|
-
!contains(github.event.issue.labels.*.name, 'review') &&
|
|
27
36
|
!endsWith(github.actor, '[bot]')
|
|
28
37
|
runs-on: ubuntu-latest
|
|
29
38
|
timeout-minutes: 5
|
|
@@ -70,7 +79,7 @@ jobs:
|
|
|
70
79
|
app-id: ${{ secrets.BOT_APP_ID }}
|
|
71
80
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
|
72
81
|
|
|
73
|
-
- name: Bot
|
|
82
|
+
- name: Bot takes the issue over
|
|
74
83
|
if: steps.check.outputs.authorized == 'true'
|
|
75
84
|
env:
|
|
76
85
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
@@ -78,8 +87,19 @@ jobs:
|
|
|
78
87
|
LABEL: ${{ github.event.label.name }}
|
|
79
88
|
run: |
|
|
80
89
|
set -euo pipefail
|
|
81
|
-
|
|
90
|
+
|
|
91
|
+
# Clear review FIRST. A person adding a work label is the human review the label was
|
|
92
|
+
# waiting for, and the classifier refuses to route an issue that still carries it, so
|
|
93
|
+
# removing it here is what makes the hand-off work at all. It also has to happen
|
|
94
|
+
# before bot-working, because that is the event the classifier reads: adding
|
|
95
|
+
# bot-working first would raise an event whose payload still shows review.
|
|
96
|
+
# --remove-label on an absent label is a no-op, so this is safe on a fresh issue.
|
|
97
|
+
# `stalled` goes with it: a person taking the issue on restarts the work, so the
|
|
98
|
+
# marker the janitor retries on must not survive into the new run.
|
|
99
|
+
gh issue edit "$ISSUE_NUMBER" --remove-label "review" --remove-label "stalled" 2>/dev/null ||
|
|
100
|
+
echo "::notice::no review or stalled label to clear on #$ISSUE_NUMBER"
|
|
101
|
+
|
|
82
102
|
echo "Adding bot-working label to issue #$ISSUE_NUMBER (triggered by $LABEL)"
|
|
83
103
|
gh issue edit "$ISSUE_NUMBER" --add-label "bot-working"
|
|
84
|
-
|
|
104
|
+
|
|
85
105
|
echo "::notice::bot-working label added - bot will now own the $LABEL workflow"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
# Managed by @plainconceptsplatform/workflows. Source: loops/workflows/shared/platform-defaults.md. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
3
|
-
description: Shared network and safe-output defaults for catalog agent workflows.
|
|
3
|
+
description: Shared network and safe-output defaults for catalog agent workflows, plus the verification rules every worker that builds or pushes has to follow. The body below is runtime-imported into each worker's prompt ahead of its own steps.
|
|
4
4
|
|
|
5
5
|
network:
|
|
6
6
|
allowed:
|
|
@@ -17,3 +17,20 @@ network:
|
|
|
17
17
|
safe-outputs:
|
|
18
18
|
threat-detection: false
|
|
19
19
|
---
|
|
20
|
+
|
|
21
|
+
## Verification, for every worker that builds or pushes
|
|
22
|
+
|
|
23
|
+
- Scope every check to the files you changed. This is the runner, not a preference: a
|
|
24
|
+
whole-repository lint, build or test run exhausts its memory and gets killed mid-run, which
|
|
25
|
+
fails the job with no useful output. Pass the changed paths to the linter (`pnpm exec biome
|
|
26
|
+
check <files>`), build only the projects containing them, and run only the test project that
|
|
27
|
+
covers them. Escalate to the full suite only after the scoped run passes and only when the
|
|
28
|
+
change crosses a project boundary.
|
|
29
|
+
- Run nothing at all for a change that touches only documentation. A cold Release build on a
|
|
30
|
+
shared runner is minutes the run does not get back.
|
|
31
|
+
- Never make a check pass by weakening it: not a deleted test, not a lowered threshold, not a
|
|
32
|
+
skipped step. Fix the cause and run it again.
|
|
33
|
+
- Once the checks pass, run the project's lint fix command over the files you changed
|
|
34
|
+
(`pnpm lint:fix`, `pnpm exec biome check --write <changed-files>`, or its equivalent), or
|
|
35
|
+
correct what lint reports where no fix command exists. A branch that arrives with lint errors
|
|
36
|
+
gets sent back for them.
|