@plainconceptsplatform/workflows 1.9.0 → 1.10.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.
- package/README.md +1 -1
- package/dist/catalog-installation.js +2 -2
- package/dist/package-baseline.js +4 -1
- package/dist/route-processing.js +4 -1
- package/dist/worker-env.d.ts +1 -1
- package/dist/worker-env.js +6 -2
- package/dist/workflow-catalog.d.ts +3 -1
- package/dist/workflow-catalog.js +6 -0
- package/loops/actions/add-issue-labels/action.yml +50 -50
- package/loops/actions/agent-output.cjs +17 -17
- package/loops/actions/apply-agent-bundle/action.yml +24 -24
- package/loops/actions/apply-agent-comments/action.yml +42 -42
- package/loops/actions/apply-agent-labels/action.yml +55 -55
- package/loops/actions/audit-close/action.yml +13 -6
- package/loops/actions/classify-route/classify-route.sh +3 -1
- package/loops/actions/cleanup-artifacts/action.yml +91 -91
- package/loops/actions/close-agent-issues/action.yml +43 -43
- package/loops/actions/collect-doc-drift/action.yml +29 -0
- package/loops/actions/collect-doc-drift/collect-doc-drift.mjs +133 -0
- package/loops/actions/create-issue-comment/action.yml +29 -29
- package/loops/actions/download-agent-output/action.yml +53 -53
- package/loops/actions/identify-gate-subject/action.yml +4 -0
- package/loops/actions/land-pull-request/action.yml +10 -0
- package/loops/actions/land-pull-request/land-pull-request.sh +14 -0
- package/loops/actions/link-pr-to-issue/action.yml +40 -40
- package/loops/actions/list-open-issues/action.yml +33 -33
- package/loops/actions/load-issue-context/action.yml +45 -45
- package/loops/actions/merge-agent-pr/action.yml +49 -49
- package/loops/actions/remove-issue-labels/action.yml +37 -37
- package/loops/actions/report-workflow-errors/action.yml +1 -1
- package/loops/actions/update-agent-issues/action.yml +58 -58
- package/loops/actions/validate-refine-output/action.yml +6 -1
- package/loops/actions/validate-refine-output/validate-refine-output.sh +20 -2
- package/loops/actions/validate-review-output/action.yml +35 -35
- package/loops/actions/validate-triage-output/action.yml +36 -36
- package/loops/actions/verify-composite-actions/action.yml +9 -9
- package/loops/actions/verify-refine-output/action.yml +9 -9
- package/loops/actions/verify-route-matrix/action.yml +9 -9
- package/loops/actions/verify-route-matrix/verify-route-matrix.sh +38 -5
- package/loops/docs/diagrams.md +45 -2
- package/loops/templates/agentics/agentics-maintenance.yml +121 -121
- package/loops/templates/issues/bug_report.yml +109 -109
- package/loops/templates/issues/feature_request.yml +75 -75
- package/loops/workflows/agent-docs-audit.md +266 -0
- package/loops/workflows/agent-merge-gate.md +11 -7
- package/loops/workflows/agent-refine.md +61 -11
- package/loops/workflows/shared/platform-defaults.md +53 -53
- package/loops/workflows/work-router.yml +120 -3
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-review-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
-
name: Validate review output
|
|
3
|
-
description: Verify an apply-review outcome accounts for every unresolved review thread.
|
|
4
|
-
inputs:
|
|
5
|
-
output-file:
|
|
6
|
-
description: Path to agent_output.json.
|
|
7
|
-
required: true
|
|
8
|
-
pr-number:
|
|
9
|
-
description: Pull request receiving the review feedback.
|
|
10
|
-
required: true
|
|
11
|
-
review-threads-file:
|
|
12
|
-
description: JSON file containing unresolved review threads.
|
|
13
|
-
required: true
|
|
14
|
-
outputs:
|
|
15
|
-
valid:
|
|
16
|
-
description: Whether the agent output is a valid review outcome.
|
|
17
|
-
value: ${{ steps.validate.outputs.valid }}
|
|
18
|
-
outcome:
|
|
19
|
-
description: "Deterministic review outcome: implemented, already-satisfied, needs-human, or invalid."
|
|
20
|
-
value: ${{ steps.validate.outputs.outcome }}
|
|
21
|
-
runs:
|
|
22
|
-
using: composite
|
|
23
|
-
steps:
|
|
24
|
-
- name: Validate review outcome
|
|
25
|
-
id: validate
|
|
26
|
-
shell: bash
|
|
27
|
-
env:
|
|
28
|
-
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
29
|
-
PR_NUMBER: ${{ inputs.pr-number }}
|
|
30
|
-
REVIEW_THREADS_FILE: ${{ inputs.review-threads-file }}
|
|
31
|
-
run: |
|
|
32
|
-
set -euo pipefail
|
|
33
|
-
outcome="$(bash "${{ github.action_path }}/validate-review-output.sh" "$OUTPUT_FILE" "$PR_NUMBER" "$REVIEW_THREADS_FILE")"
|
|
34
|
-
echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
|
|
35
|
-
echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-review-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Validate review output
|
|
3
|
+
description: Verify an apply-review outcome accounts for every unresolved review thread.
|
|
4
|
+
inputs:
|
|
5
|
+
output-file:
|
|
6
|
+
description: Path to agent_output.json.
|
|
7
|
+
required: true
|
|
8
|
+
pr-number:
|
|
9
|
+
description: Pull request receiving the review feedback.
|
|
10
|
+
required: true
|
|
11
|
+
review-threads-file:
|
|
12
|
+
description: JSON file containing unresolved review threads.
|
|
13
|
+
required: true
|
|
14
|
+
outputs:
|
|
15
|
+
valid:
|
|
16
|
+
description: Whether the agent output is a valid review outcome.
|
|
17
|
+
value: ${{ steps.validate.outputs.valid }}
|
|
18
|
+
outcome:
|
|
19
|
+
description: "Deterministic review outcome: implemented, already-satisfied, needs-human, or invalid."
|
|
20
|
+
value: ${{ steps.validate.outputs.outcome }}
|
|
21
|
+
runs:
|
|
22
|
+
using: composite
|
|
23
|
+
steps:
|
|
24
|
+
- name: Validate review outcome
|
|
25
|
+
id: validate
|
|
26
|
+
shell: bash
|
|
27
|
+
env:
|
|
28
|
+
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
29
|
+
PR_NUMBER: ${{ inputs.pr-number }}
|
|
30
|
+
REVIEW_THREADS_FILE: ${{ inputs.review-threads-file }}
|
|
31
|
+
run: |
|
|
32
|
+
set -euo pipefail
|
|
33
|
+
outcome="$(bash "${{ github.action_path }}/validate-review-output.sh" "$OUTPUT_FILE" "$PR_NUMBER" "$REVIEW_THREADS_FILE")"
|
|
34
|
+
echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
|
|
35
|
+
echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-triage-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
-
name: Validate triage output
|
|
3
|
-
description: Verify agent_output.json contains a usable triage verdict before any GitHub writes.
|
|
4
|
-
inputs:
|
|
5
|
-
output-file:
|
|
6
|
-
description: Path to agent_output.json.
|
|
7
|
-
required: true
|
|
8
|
-
issue-number:
|
|
9
|
-
description: Issue number that every triage outcome must target.
|
|
10
|
-
required: true
|
|
11
|
-
outputs:
|
|
12
|
-
valid:
|
|
13
|
-
description: Whether the output contains a usable triage comment with a verdict.
|
|
14
|
-
value: ${{ steps.validate.outputs.valid }}
|
|
15
|
-
outcome:
|
|
16
|
-
description: "Deterministic triage outcome: pass, needs-info, needs-maintainer, block, or invalid."
|
|
17
|
-
value: ${{ steps.validate.outputs.outcome }}
|
|
18
|
-
runs:
|
|
19
|
-
using: composite
|
|
20
|
-
steps:
|
|
21
|
-
- name: Validate triage outcome
|
|
22
|
-
id: validate
|
|
23
|
-
shell: bash
|
|
24
|
-
env:
|
|
25
|
-
ISSUE_NUMBER: ${{ inputs.issue-number }}
|
|
26
|
-
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
27
|
-
run: |
|
|
28
|
-
set -euo pipefail
|
|
29
|
-
|
|
30
|
-
outcome="$(bash "${{ github.action_path }}/validate-triage-output.sh" "$OUTPUT_FILE" "$ISSUE_NUMBER")"
|
|
31
|
-
echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
|
|
32
|
-
echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
|
|
33
|
-
|
|
34
|
-
if [ "$outcome" = 'invalid' ]; then
|
|
35
|
-
echo "::warning::Agent output has no usable triage outcome. It will not be applied."
|
|
36
|
-
fi
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/validate-triage-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Validate triage output
|
|
3
|
+
description: Verify agent_output.json contains a usable triage verdict before any GitHub writes.
|
|
4
|
+
inputs:
|
|
5
|
+
output-file:
|
|
6
|
+
description: Path to agent_output.json.
|
|
7
|
+
required: true
|
|
8
|
+
issue-number:
|
|
9
|
+
description: Issue number that every triage outcome must target.
|
|
10
|
+
required: true
|
|
11
|
+
outputs:
|
|
12
|
+
valid:
|
|
13
|
+
description: Whether the output contains a usable triage comment with a verdict.
|
|
14
|
+
value: ${{ steps.validate.outputs.valid }}
|
|
15
|
+
outcome:
|
|
16
|
+
description: "Deterministic triage outcome: pass, needs-info, needs-maintainer, block, or invalid."
|
|
17
|
+
value: ${{ steps.validate.outputs.outcome }}
|
|
18
|
+
runs:
|
|
19
|
+
using: composite
|
|
20
|
+
steps:
|
|
21
|
+
- name: Validate triage outcome
|
|
22
|
+
id: validate
|
|
23
|
+
shell: bash
|
|
24
|
+
env:
|
|
25
|
+
ISSUE_NUMBER: ${{ inputs.issue-number }}
|
|
26
|
+
OUTPUT_FILE: ${{ inputs.output-file }}
|
|
27
|
+
run: |
|
|
28
|
+
set -euo pipefail
|
|
29
|
+
|
|
30
|
+
outcome="$(bash "${{ github.action_path }}/validate-triage-output.sh" "$OUTPUT_FILE" "$ISSUE_NUMBER")"
|
|
31
|
+
echo "outcome=$outcome" >> "$GITHUB_OUTPUT"
|
|
32
|
+
echo "valid=$([ "$outcome" != 'invalid' ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
|
|
33
|
+
|
|
34
|
+
if [ "$outcome" = 'invalid' ]; then
|
|
35
|
+
echo "::warning::Agent output has no usable triage outcome. It will not be applied."
|
|
36
|
+
fi
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-composite-actions/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
-
name: Verify composite actions
|
|
3
|
-
description: Check every local composite action manifest parses and uses only contexts a composite action actually has.
|
|
4
|
-
runs:
|
|
5
|
-
using: composite
|
|
6
|
-
steps:
|
|
7
|
-
- name: Validate composite action manifests
|
|
8
|
-
shell: bash
|
|
9
|
-
run: bash "${GITHUB_ACTION_PATH}/verify-composite-actions.sh"
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-composite-actions/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify composite actions
|
|
3
|
+
description: Check every local composite action manifest parses and uses only contexts a composite action actually has.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Validate composite action manifests
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${GITHUB_ACTION_PATH}/verify-composite-actions.sh"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-refine-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
-
name: Verify refine output validation
|
|
3
|
-
description: Exercise deterministic Refine output validation regressions.
|
|
4
|
-
runs:
|
|
5
|
-
using: composite
|
|
6
|
-
steps:
|
|
7
|
-
- name: Verify refinement outcomes
|
|
8
|
-
shell: bash
|
|
9
|
-
run: bash "${{ github.action_path }}/verify-refine-output.sh"
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-refine-output/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify refine output validation
|
|
3
|
+
description: Exercise deterministic Refine output validation regressions.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Verify refinement outcomes
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${{ github.action_path }}/verify-refine-output.sh"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-route-matrix/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
-
name: Verify route matrix
|
|
3
|
-
description: Exercise the router's classifier against every supported event, and check that each route and dispatch operation has a job in work-router.yml.
|
|
4
|
-
runs:
|
|
5
|
-
using: composite
|
|
6
|
-
steps:
|
|
7
|
-
- name: Run route matrix verification
|
|
8
|
-
shell: bash
|
|
9
|
-
run: bash "${GITHUB_ACTION_PATH}/verify-route-matrix.sh"
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/actions/verify-route-matrix/action.yml. Update with workflows update --force; consumer edits may be overwritten.
|
|
2
|
+
name: Verify route matrix
|
|
3
|
+
description: Exercise the router's classifier against every supported event, and check that each route and dispatch operation has a job in work-router.yml.
|
|
4
|
+
runs:
|
|
5
|
+
using: composite
|
|
6
|
+
steps:
|
|
7
|
+
- name: Run route matrix verification
|
|
8
|
+
shell: bash
|
|
9
|
+
run: bash "${GITHUB_ACTION_PATH}/verify-route-matrix.sh"
|
|
@@ -26,7 +26,8 @@ router_env() {
|
|
|
26
26
|
sed -n "s/^ $1: *//p" "$ROUTER_YML" | head -1 | sed -e 's/^"\(.*\)"$/\1/' -e "s/^'\(.*\)'$/\1/"
|
|
27
27
|
}
|
|
28
28
|
AUDIT_CRON="$(router_env AUDIT_CRON)"
|
|
29
|
-
|
|
29
|
+
DOCS_AUDIT_CRON="$(router_env DOCS_AUDIT_CRON)"
|
|
30
|
+
export AUDIT_CRON DOCS_AUDIT_CRON
|
|
30
31
|
|
|
31
32
|
# shellcheck source-path=SCRIPTDIR
|
|
32
33
|
# shellcheck source=../classify-route/classify-route.sh
|
|
@@ -34,7 +35,7 @@ source "${HERE}/../classify-route/classify-route.sh"
|
|
|
34
35
|
|
|
35
36
|
# Every worker route the package knows. The ones with a worker file here are installed; the
|
|
36
37
|
# others must have no job in this router. Plumbing routes are in every router.
|
|
37
|
-
ALL_WORKER_ROUTES=(refine implement triage apply-review merge-gate audit release)
|
|
38
|
+
ALL_WORKER_ROUTES=(refine implement triage apply-review merge-gate audit docs-audit release)
|
|
38
39
|
PLUMBING_ROUTES=(bot-approve evidence audit-close cleanup-artifacts reconcile-bot-pr-runs housekeeping validate)
|
|
39
40
|
|
|
40
41
|
worker_installed() {
|
|
@@ -285,6 +286,13 @@ assert "a scheduled audit reports its trigger kind" scheduled \
|
|
|
285
286
|
assert "a dispatched audit reports its trigger kind" manual \
|
|
286
287
|
"$(route_field trigger-kind EVENT=workflow_dispatch OPERATION=audit INPUT_TRIGGER_KIND=manual)"
|
|
287
288
|
|
|
289
|
+
assert_route "the docs audit slot reaches its route" docs-audit \
|
|
290
|
+
EVENT=schedule "SCHEDULE=${DOCS_AUDIT_CRON:-47 2 1,15 * *}"
|
|
291
|
+
assert_route "a dispatched docs audit reaches its route" docs-audit \
|
|
292
|
+
EVENT=workflow_dispatch OPERATION=docs-audit
|
|
293
|
+
assert "a scheduled docs audit reports its trigger kind, or its cheap exit never fires" scheduled \
|
|
294
|
+
"$(route_field trigger-kind EVENT=schedule "SCHEDULE=${DOCS_AUDIT_CRON:-47 2 1,15 * *}")"
|
|
295
|
+
|
|
288
296
|
echo "── Prompt hygiene ────────────────────────────────────────────────────────"
|
|
289
297
|
|
|
290
298
|
# Everything below a worker's frontmatter is the prompt. Three things must not be in one.
|
|
@@ -368,6 +376,15 @@ if worker_installed audit; then
|
|
|
368
376
|
echo "FAIL: the audit slot cron is '${cron_line}' but env.AUDIT_CRON is '${AUDIT_CRON}'" >&2
|
|
369
377
|
fi
|
|
370
378
|
fi
|
|
379
|
+
if worker_installed docs-audit; then
|
|
380
|
+
cron_line="$(sed -n 's/^ *- cron: "\([^"]*\)" # docs-audit slot.*/\1/p' "$ROUTER_YML" | head -1)"
|
|
381
|
+
if [ -z "$DOCS_AUDIT_CRON" ]; then
|
|
382
|
+
MIRROR_OK=0; echo "FAIL: work-router.yml defines no DOCS_AUDIT_CRON in its env: block" >&2
|
|
383
|
+
elif [ "$DOCS_AUDIT_CRON" != "$cron_line" ]; then
|
|
384
|
+
MIRROR_OK=0
|
|
385
|
+
echo "FAIL: the docs-audit slot cron is '${cron_line}' but env.DOCS_AUDIT_CRON is '${DOCS_AUDIT_CRON}'" >&2
|
|
386
|
+
fi
|
|
387
|
+
fi
|
|
371
388
|
# And nothing may go back to naming the CI workflow directly: a second literal is a second
|
|
372
389
|
# thing to keep in step, and the one that gets forgotten is the one inside a jq filter.
|
|
373
390
|
if [ "$(count -c '"App: CI"' "$ROUTER_YML")" -gt 2 ]; then
|
|
@@ -1317,6 +1334,19 @@ if [ -f "$AUDIT_CLOSE_YML" ] && worker_installed audit; then
|
|
|
1317
1334
|
echo "FAIL: the audit backpressure query and audit-close disagree about stale-audit; abandoned reports would block every future audit" >&2
|
|
1318
1335
|
fi
|
|
1319
1336
|
|
|
1337
|
+
# The docs audit shares the chain, so it has the same two ways to go quiet: audit-close stops
|
|
1338
|
+
# listing its reports, or its backpressure stops excluding the ones marked stale.
|
|
1339
|
+
DOCS_AUDIT_WORKER_MD="${WORKFLOWS_DIR}/agent-docs-audit.md"
|
|
1340
|
+
if [ -f "$DOCS_AUDIT_WORKER_MD" ]; then
|
|
1341
|
+
docs_query="$(sed -n 's/^ *query: *"\(.*\)" *$/\1/p' "$DOCS_AUDIT_WORKER_MD" | head -1)"
|
|
1342
|
+
if [[ "$docs_query" == *label:docs-audit*-label:stale-audit* ]] && grep -qF "'docs-audit'" "$AUDIT_CLOSE_YML"; then
|
|
1343
|
+
PASS=$((PASS + 1))
|
|
1344
|
+
else
|
|
1345
|
+
AC_OK=0
|
|
1346
|
+
echo "FAIL: audit-close and the docs-audit backpressure disagree; abandoned reports would stop every future docs audit" >&2
|
|
1347
|
+
fi
|
|
1348
|
+
fi
|
|
1349
|
+
|
|
1320
1350
|
if [ "$AC_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
|
|
1321
1351
|
fi
|
|
1322
1352
|
|
|
@@ -1822,7 +1852,7 @@ LEAD_OK=1
|
|
|
1822
1852
|
# A consumer has it at its root; this package keeps the template beside the workflows.
|
|
1823
1853
|
CI_JSON="${HERE}/../../../opencode.ci.json"
|
|
1824
1854
|
[ -f "$CI_JSON" ] || CI_JSON="${HERE}/../../templates/opencode/opencode.ci.json"
|
|
1825
|
-
for route in refine implement triage apply-review merge-gate audit release; do
|
|
1855
|
+
for route in refine implement triage apply-review merge-gate audit docs-audit release; do
|
|
1826
1856
|
worker_md="${WORKFLOWS_DIR}/agent-${route}.md"
|
|
1827
1857
|
[ -f "$worker_md" ] || continue
|
|
1828
1858
|
lead=$(sed -n 's/^ AGENT_LEAD_MODEL: "\(.*\)"$/\1/p' "$worker_md")
|
|
@@ -1853,7 +1883,7 @@ PLUGINS_OK=1
|
|
|
1853
1883
|
if ! grep -qF "(cd .opencode && npm install" "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
|
|
1854
1884
|
PLUGINS_OK=0; echo "FAIL: the CI setup must install .opencode's dependencies or the harness plugins never load" >&2
|
|
1855
1885
|
fi
|
|
1856
|
-
for route in refine implement triage apply-review merge-gate audit release; do
|
|
1886
|
+
for route in refine implement triage apply-review merge-gate audit docs-audit release; do
|
|
1857
1887
|
worker_md="${WORKFLOWS_DIR}/agent-${route}.md"
|
|
1858
1888
|
[ -f "$worker_md" ] || continue
|
|
1859
1889
|
tier=$(sed -n 's/^ AGENT_TIER_MODEL: "\(.*\)"$/\1/p' "$worker_md")
|
|
@@ -2281,7 +2311,7 @@ if [ -f "$ERROR_REPORT_YML" ]; then
|
|
|
2281
2311
|
# The worker names are built from a route list by a template literal, so expand that list
|
|
2282
2312
|
# the same way rather than looking for filenames the file never spells out.
|
|
2283
2313
|
sed -n "/const OWNED = new Set(\[/,/^ \]);\$/p" "$ERROR_REPORT_YML" |
|
|
2284
|
-
grep -oE "'(refine|implement|triage|apply-review|merge-gate|audit|release)'" | tr -d "'" |
|
|
2314
|
+
grep -oE "'(refine|implement|triage|apply-review|merge-gate|audit|docs-audit|release)'" | tr -d "'" |
|
|
2285
2315
|
sed 's|^|agent-|; s|$|.lock.yml|' || true
|
|
2286
2316
|
} | sort -u )
|
|
2287
2317
|
shipped=$( {
|
|
@@ -2596,6 +2626,8 @@ assert "a dispatched apply-review carries its attempt count" 3 \
|
|
|
2596
2626
|
"$(route_field attempts EVENT=workflow_dispatch OPERATION=apply-review INPUT_PR_NUMBER=9 INPUT_ATTEMPTS_SO_FAR=3)"
|
|
2597
2627
|
assert "a dispatched refine still carries its mode alongside the count" rerefine \
|
|
2598
2628
|
"$(route_field refine-mode EVENT=workflow_dispatch OPERATION=refine INPUT_ISSUE_NUMBER=42 INPUT_MODE=rerefine INPUT_ATTEMPTS_SO_FAR=3)"
|
|
2629
|
+
assert "the hourly sweep's assume pass reaches refine in assume mode" assume \
|
|
2630
|
+
"$(route_field refine-mode EVENT=workflow_dispatch OPERATION=refine INPUT_ISSUE_NUMBER=42 INPUT_MODE=assume)"
|
|
2599
2631
|
|
|
2600
2632
|
if [ "$RETRY_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
|
|
2601
2633
|
|
|
@@ -2942,6 +2974,7 @@ fi
|
|
|
2942
2974
|
ONE_AT_A_TIME_OK=1
|
|
2943
2975
|
grep -qF 'The next landing releases the next one."' "${WORKFLOWS_DIR}/work-router.yml" ||
|
|
2944
2976
|
{ ONE_AT_A_TIME_OK=0; echo "FAIL: land-stack-child releases every free sibling at once" >&2; }
|
|
2977
|
+
# shellcheck disable=SC2015
|
|
2945
2978
|
grep -qF 'echo "Released #$child of feature #$feature."' "${WORKFLOWS_DIR}/work-router.yml" &&
|
|
2946
2979
|
grep -A1 -F 'echo "Released #$child of feature #$feature."' "${WORKFLOWS_DIR}/work-router.yml" | grep -qE '^\s+break$' ||
|
|
2947
2980
|
{ ONE_AT_A_TIME_OK=0; echo "FAIL: stack-landed releases every free child of the next feature at once" >&2; }
|
package/loops/docs/diagrams.md
CHANGED
|
@@ -48,6 +48,7 @@ flowchart TD
|
|
|
48
48
|
work -->|apply-review| wReview
|
|
49
49
|
work -->|merge-gate| wGate
|
|
50
50
|
work -->|audit| wAudit
|
|
51
|
+
work -->|docs-audit| wDocs
|
|
51
52
|
work -->|release| wRelease
|
|
52
53
|
triageOnly("dispatch-triage<br/>re-enters as the App, so the<br/>worker sees a trusted actor") --> wTriage
|
|
53
54
|
wRefine("agent-refine")
|
|
@@ -55,6 +56,7 @@ flowchart TD
|
|
|
55
56
|
wReview("agent-apply-review")
|
|
56
57
|
wGate("agent-merge-gate<br/>one lock for the whole repo")
|
|
57
58
|
wAudit("agent-audit")
|
|
59
|
+
wDocs("agent-docs-audit")
|
|
58
60
|
wRelease("agent-release")
|
|
59
61
|
wTriage("agent-triage")
|
|
60
62
|
classify -.->|"cron or dispatch"| plumbing
|
|
@@ -487,8 +489,7 @@ before anything changes. Applying them one at a time produces contradictory comm
|
|
|
487
489
|
|
|
488
490
|
## agent-audit.md
|
|
489
491
|
|
|
490
|
-
|
|
491
|
-
changes nothing.
|
|
492
|
+
Creates work rather than consuming it. Read-only: it files an issue and changes nothing.
|
|
492
493
|
|
|
493
494
|
```mermaid
|
|
494
495
|
flowchart TD
|
|
@@ -528,6 +529,48 @@ reads them next time.
|
|
|
528
529
|
|
|
529
530
|
---
|
|
530
531
|
|
|
532
|
+
## agent-docs-audit.md
|
|
533
|
+
|
|
534
|
+
The audit's documentation sibling. Read-only, optional, and most of its work happens before the
|
|
535
|
+
model starts: a repository with no recent commits never reaches it, and the facts a script can
|
|
536
|
+
establish are on disk when it does.
|
|
537
|
+
|
|
538
|
+
```mermaid
|
|
539
|
+
flowchart TD
|
|
540
|
+
daStart("Work Router<br/>docs-audit route<br/>days 1 and 15, or dispatch") --> daBack
|
|
541
|
+
daBack{"Backpressure (rung 1)<br/>No open report?"}
|
|
542
|
+
daBack -.->|no| daIdle
|
|
543
|
+
daBack -->|yes| daMoved
|
|
544
|
+
daMoved{"Commits in 17 days,<br/>or a dispatch? (rung 1)"}
|
|
545
|
+
daMoved -.->|no| daIdle
|
|
546
|
+
daMoved -->|yes| daFacts
|
|
547
|
+
daFacts("Facts (rung 3)<br/>Broken links, missing paths,<br/>open issues, the standard") --> daRun
|
|
548
|
+
daRun("Compare (rung 5)<br/>Entry documents against<br/>the code and the standard") --> daDedupe
|
|
549
|
+
daDedupe{"New finding, proven<br/>on both sides?"}
|
|
550
|
+
daDedupe -.->|"none left"| daQuiet
|
|
551
|
+
daDedupe -->|"some"| daFile
|
|
552
|
+
daFile("One issue with<br/>evidence per finding") --> daReport
|
|
553
|
+
daReport(("Filed<br/>labelled docs-audit and refine,<br/>sized and split per finding"))
|
|
554
|
+
daQuiet(("Nothing to file<br/>the documentation is current"))
|
|
555
|
+
daIdle(("Idle<br/>no agent, no spend"))
|
|
556
|
+
|
|
557
|
+
classDef start fill:#ffffff,stroke:#172033,stroke-width:2px,color:#172033
|
|
558
|
+
classDef action fill:#eef0ff,stroke:#554cff,stroke-width:2px,color:#172033
|
|
559
|
+
classDef decision fill:#fff8e8,stroke:#c75b00,stroke-width:2px,color:#172033
|
|
560
|
+
classDef idle fill:#202c40,stroke:#738198,stroke-width:2px,color:#ffffff
|
|
561
|
+
classDef success fill:#e8f8ec,stroke:#18883c,stroke-width:2px,color:#145a32
|
|
562
|
+
class daStart start
|
|
563
|
+
class daFacts,daRun,daFile action
|
|
564
|
+
class daBack,daMoved,daDedupe decision
|
|
565
|
+
class daIdle idle
|
|
566
|
+
class daReport,daQuiet success
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
Reports join the audit chain: `audit-close` closes one when its children are closed, and marks it
|
|
570
|
+
`stale-audit` when nobody acted on it, which frees the slot.
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
531
574
|
## agent-release.md
|
|
532
575
|
|
|
533
576
|
Manual dispatch only. The agent writes prose; deterministic jobs do everything irreversible, and
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
# Managed by @plainconceptsplatform/workflows. Source: loops/templates/agentics/agentics-maintenance.yml. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
|
-
# Derived from the gh-aw v0.87.5 maintenance workflow.
|
|
3
|
-
# Copy provenance is documented in docs/ownership.md.
|
|
4
|
-
name: Agentic Maintenance
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
schedule:
|
|
8
|
-
- cron: "37 0 * * *"
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
inputs:
|
|
11
|
-
operation:
|
|
12
|
-
description: Optional maintenance operation to run
|
|
13
|
-
required: false
|
|
14
|
-
type: choice
|
|
15
|
-
default: ""
|
|
16
|
-
options:
|
|
17
|
-
- ""
|
|
18
|
-
- disable
|
|
19
|
-
- enable
|
|
20
|
-
- update
|
|
21
|
-
- upgrade
|
|
22
|
-
- safe_outputs
|
|
23
|
-
- create_labels
|
|
24
|
-
- activity_report
|
|
25
|
-
- close_agentic_workflows_issues
|
|
26
|
-
- clean_cache_memories
|
|
27
|
-
- update_pull_request_branches
|
|
28
|
-
- validate
|
|
29
|
-
- forecast
|
|
30
|
-
run_url:
|
|
31
|
-
description: Run URL or run ID required for safe_outputs
|
|
32
|
-
required: false
|
|
33
|
-
type: string
|
|
34
|
-
default: ""
|
|
35
|
-
workflow_call:
|
|
36
|
-
inputs:
|
|
37
|
-
operation:
|
|
38
|
-
required: false
|
|
39
|
-
type: string
|
|
40
|
-
default: ""
|
|
41
|
-
run_url:
|
|
42
|
-
required: false
|
|
43
|
-
type: string
|
|
44
|
-
default: ""
|
|
45
|
-
|
|
46
|
-
permissions: {}
|
|
47
|
-
|
|
48
|
-
jobs:
|
|
49
|
-
close-expired-discussions:
|
|
50
|
-
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
51
|
-
runs-on: agents-arc
|
|
52
|
-
permissions:
|
|
53
|
-
discussions: write
|
|
54
|
-
steps:
|
|
55
|
-
- name: Setup Scripts
|
|
56
|
-
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
57
|
-
with:
|
|
58
|
-
destination: ${{ runner.temp }}/gh-aw/actions
|
|
59
|
-
- name: Close expired discussions
|
|
60
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
61
|
-
with:
|
|
62
|
-
script: |
|
|
63
|
-
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
64
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
65
|
-
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_discussions.cjs');
|
|
66
|
-
await main();
|
|
67
|
-
close-expired-issues:
|
|
68
|
-
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
69
|
-
runs-on: agents-arc
|
|
70
|
-
permissions:
|
|
71
|
-
issues: write
|
|
72
|
-
steps:
|
|
73
|
-
- name: Setup Scripts
|
|
74
|
-
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
75
|
-
with:
|
|
76
|
-
destination: ${{ runner.temp }}/gh-aw/actions
|
|
77
|
-
- name: Close expired issues
|
|
78
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
79
|
-
with:
|
|
80
|
-
script: |
|
|
81
|
-
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
82
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
83
|
-
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_issues.cjs');
|
|
84
|
-
await main();
|
|
85
|
-
close-expired-pull-requests:
|
|
86
|
-
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
87
|
-
runs-on: agents-arc
|
|
88
|
-
permissions:
|
|
89
|
-
pull-requests: write
|
|
90
|
-
steps:
|
|
91
|
-
- name: Setup Scripts
|
|
92
|
-
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
93
|
-
with:
|
|
94
|
-
destination: ${{ runner.temp }}/gh-aw/actions
|
|
95
|
-
- name: Close expired pull requests
|
|
96
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
97
|
-
with:
|
|
98
|
-
script: |
|
|
99
|
-
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
100
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
101
|
-
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_pull_requests.cjs');
|
|
102
|
-
await main();
|
|
103
|
-
cleanup-cache-memory:
|
|
104
|
-
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '' || inputs.operation == 'clean_cache_memories') }}
|
|
105
|
-
runs-on: agents-arc
|
|
106
|
-
permissions:
|
|
107
|
-
actions: write
|
|
108
|
-
steps:
|
|
109
|
-
- name: Setup Scripts
|
|
110
|
-
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
111
|
-
with:
|
|
112
|
-
destination: ${{ runner.temp }}/gh-aw/actions
|
|
113
|
-
- name: Cleanup outdated cache-memory entries
|
|
114
|
-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
115
|
-
with:
|
|
116
|
-
script: |
|
|
117
|
-
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
118
|
-
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
119
|
-
const { main } = require('${{ runner.temp }}/gh-aw/actions/cleanup_cache_memory.cjs');
|
|
120
|
-
await main();
|
|
121
|
-
#
|
|
1
|
+
# Managed by @plainconceptsplatform/workflows. Source: loops/templates/agentics/agentics-maintenance.yml. Update with `workflows update --force`; consumer edits may be overwritten.
|
|
2
|
+
# Derived from the gh-aw v0.87.5 maintenance workflow.
|
|
3
|
+
# Copy provenance is documented in docs/ownership.md.
|
|
4
|
+
name: Agentic Maintenance
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "37 0 * * *"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
operation:
|
|
12
|
+
description: Optional maintenance operation to run
|
|
13
|
+
required: false
|
|
14
|
+
type: choice
|
|
15
|
+
default: ""
|
|
16
|
+
options:
|
|
17
|
+
- ""
|
|
18
|
+
- disable
|
|
19
|
+
- enable
|
|
20
|
+
- update
|
|
21
|
+
- upgrade
|
|
22
|
+
- safe_outputs
|
|
23
|
+
- create_labels
|
|
24
|
+
- activity_report
|
|
25
|
+
- close_agentic_workflows_issues
|
|
26
|
+
- clean_cache_memories
|
|
27
|
+
- update_pull_request_branches
|
|
28
|
+
- validate
|
|
29
|
+
- forecast
|
|
30
|
+
run_url:
|
|
31
|
+
description: Run URL or run ID required for safe_outputs
|
|
32
|
+
required: false
|
|
33
|
+
type: string
|
|
34
|
+
default: ""
|
|
35
|
+
workflow_call:
|
|
36
|
+
inputs:
|
|
37
|
+
operation:
|
|
38
|
+
required: false
|
|
39
|
+
type: string
|
|
40
|
+
default: ""
|
|
41
|
+
run_url:
|
|
42
|
+
required: false
|
|
43
|
+
type: string
|
|
44
|
+
default: ""
|
|
45
|
+
|
|
46
|
+
permissions: {}
|
|
47
|
+
|
|
48
|
+
jobs:
|
|
49
|
+
close-expired-discussions:
|
|
50
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
51
|
+
runs-on: agents-arc
|
|
52
|
+
permissions:
|
|
53
|
+
discussions: write
|
|
54
|
+
steps:
|
|
55
|
+
- name: Setup Scripts
|
|
56
|
+
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
57
|
+
with:
|
|
58
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
59
|
+
- name: Close expired discussions
|
|
60
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
61
|
+
with:
|
|
62
|
+
script: |
|
|
63
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
64
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
65
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_discussions.cjs');
|
|
66
|
+
await main();
|
|
67
|
+
close-expired-issues:
|
|
68
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
69
|
+
runs-on: agents-arc
|
|
70
|
+
permissions:
|
|
71
|
+
issues: write
|
|
72
|
+
steps:
|
|
73
|
+
- name: Setup Scripts
|
|
74
|
+
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
75
|
+
with:
|
|
76
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
77
|
+
- name: Close expired issues
|
|
78
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
79
|
+
with:
|
|
80
|
+
script: |
|
|
81
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
82
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
83
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_issues.cjs');
|
|
84
|
+
await main();
|
|
85
|
+
close-expired-pull-requests:
|
|
86
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '') }}
|
|
87
|
+
runs-on: agents-arc
|
|
88
|
+
permissions:
|
|
89
|
+
pull-requests: write
|
|
90
|
+
steps:
|
|
91
|
+
- name: Setup Scripts
|
|
92
|
+
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
93
|
+
with:
|
|
94
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
95
|
+
- name: Close expired pull requests
|
|
96
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
97
|
+
with:
|
|
98
|
+
script: |
|
|
99
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
100
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
101
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_expired_pull_requests.cjs');
|
|
102
|
+
await main();
|
|
103
|
+
cleanup-cache-memory:
|
|
104
|
+
if: ${{ !(github.event.repository.fork) && github.event_name != 'push' && (github.event_name != 'workflow_dispatch' && github.event_name != 'workflow_call' || inputs.operation == '' || inputs.operation == 'clean_cache_memories') }}
|
|
105
|
+
runs-on: agents-arc
|
|
106
|
+
permissions:
|
|
107
|
+
actions: write
|
|
108
|
+
steps:
|
|
109
|
+
- name: Setup Scripts
|
|
110
|
+
uses: github/gh-aw-actions/setup@2a78d04403fdc6907d0f05327cffac9dbad5312d # v0.87.5
|
|
111
|
+
with:
|
|
112
|
+
destination: ${{ runner.temp }}/gh-aw/actions
|
|
113
|
+
- name: Cleanup outdated cache-memory entries
|
|
114
|
+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
115
|
+
with:
|
|
116
|
+
script: |
|
|
117
|
+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
|
|
118
|
+
setupGlobals(core, github, context, exec, io, getOctokit);
|
|
119
|
+
const { main } = require('${{ runner.temp }}/gh-aw/actions/cleanup_cache_memory.cjs');
|
|
120
|
+
await main();
|
|
121
|
+
#
|