@plainconceptsplatform/workflows 0.6.1 → 0.16.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 (57) hide show
  1. package/README.md +105 -88
  2. package/dist/catalog-installation.d.ts +39 -2
  3. package/dist/catalog-installation.js +172 -109
  4. package/dist/index.js +128 -73
  5. package/dist/package-baseline.d.ts +25 -0
  6. package/dist/package-baseline.js +138 -0
  7. package/dist/route-processing.d.ts +0 -2
  8. package/dist/route-processing.js +22 -91
  9. package/dist/stack-defaults.js +18 -12
  10. package/dist/tui.js +27 -43
  11. package/dist/worker-env.d.ts +46 -0
  12. package/dist/worker-env.js +179 -0
  13. package/dist/workflow-catalog.d.ts +4 -2
  14. package/dist/workflow-catalog.js +5 -3
  15. package/loops/actions/add-issue-labels/action.yml +20 -0
  16. package/loops/actions/audit-close/action.yml +180 -128
  17. package/loops/actions/classify-route/classify-route.sh +8 -2
  18. package/loops/actions/housekeeping/action.yml +251 -0
  19. package/loops/actions/merge-agent-pr/action.yml +13 -0
  20. package/loops/actions/report-workflow-errors/action.yml +385 -0
  21. package/loops/actions/validate-merge-gate-output/validate-merge-gate-output.sh +13 -1
  22. package/loops/actions/validate-triage-output/action.yml +1 -1
  23. package/loops/actions/validate-triage-output/validate-triage-output.sh +9 -5
  24. package/loops/actions/verify-composite-actions/verify-composite-actions.sh +53 -0
  25. package/loops/actions/verify-route-matrix/verify-route-matrix.sh +847 -170
  26. package/loops/templates/agentics/agentics-error-report.yml +97 -0
  27. package/loops/templates/opencode/opencode.ci.json +1 -1
  28. package/loops/workflows/agent-apply-review.md +452 -469
  29. package/loops/workflows/agent-audit.md +201 -213
  30. package/loops/workflows/agent-implement.md +616 -640
  31. package/loops/workflows/agent-merge-gate.md +830 -844
  32. package/loops/workflows/agent-refine.md +599 -633
  33. package/loops/workflows/agent-release.md +244 -258
  34. package/loops/workflows/agent-triage.md +476 -447
  35. package/loops/workflows/authorize-bot-work.yml +26 -6
  36. package/loops/workflows/work-router.yml +1185 -1038
  37. package/package.json +9 -8
  38. package/dist/action-validation.test.d.ts +0 -1
  39. package/dist/action-validation.test.js +0 -87
  40. package/dist/catalog-installation.test.d.ts +0 -1
  41. package/dist/catalog-installation.test.js +0 -485
  42. package/dist/catalog-listing.test.d.ts +0 -1
  43. package/dist/catalog-listing.test.js +0 -150
  44. package/dist/index.test.d.ts +0 -1
  45. package/dist/index.test.js +0 -273
  46. package/dist/repository-inspection.test.d.ts +0 -1
  47. package/dist/repository-inspection.test.js +0 -77
  48. package/dist/route-processing.test.d.ts +0 -1
  49. package/dist/route-processing.test.js +0 -283
  50. package/dist/stack-defaults.test.d.ts +0 -1
  51. package/dist/stack-defaults.test.js +0 -266
  52. package/dist/tui.test.d.ts +0 -1
  53. package/dist/tui.test.js +0 -249
  54. package/dist/workflow-catalog.test.d.ts +0 -1
  55. package/dist/workflow-catalog.test.js +0 -29
  56. package/loops/actions/stale-recovery/action.yml +0 -288
  57. package/loops/actions/update-changelog/action.yml +0 -113
@@ -0,0 +1,97 @@
1
+ # Managed by @plainconceptsplatform/workflows. Source: templates/agentics/agentics-error-report.yml. Update with `workflows update --force`; consumer edits may be overwritten.
2
+ name: "Agentics: Error Report"
3
+
4
+ # Once a day, look at how the workflows this package ships behaved in this repository and file
5
+ # what broke upstream, so the package gets fixed instead of every repository working around the
6
+ # same bug on its own.
7
+ #
8
+ # THIS REPOSITORY IS PRIVATE AND THE REPORT LEAVES IT. That is the whole design constraint. The
9
+ # job is deterministic — no model runs, because a model summarising a log would paraphrase
10
+ # whatever the log happened to contain — and it sends only:
11
+ #
12
+ # * the names this package gives its own workflows, jobs and steps
13
+ # * a conclusion, a runner label and a count
14
+ # * the id of a matched entry from a fixed catalogue of failure shapes
15
+ #
16
+ # It never sends a log line, a branch name, an issue title, a file path, a commit, a URL or a
17
+ # number that could be looked up. Before anything is filed, the finished text is run through a
18
+ # leak scanner; if the scanner matches, the report is withheld and the run goes red rather than
19
+ # filing it. See loops/actions/report-workflow-errors/action.yml.
20
+ #
21
+ # To turn it off: delete this file, or clear UPSTREAM_NAME below to compute the report into the
22
+ # job summary and file nothing.
23
+
24
+ run-name: "Error report: last ${{ github.event.inputs.lookback-hours || '24' }}h"
25
+
26
+ on:
27
+ schedule:
28
+ # Slot this per repository the same way as the audit cron: the report is cheap, but four
29
+ # repositories waking at the same minute still queue against one another.
30
+ - cron: "11 7 * * *"
31
+ workflow_dispatch:
32
+ inputs:
33
+ lookback-hours:
34
+ description: "How far back to look"
35
+ required: false
36
+ type: string
37
+ default: '24'
38
+ dry-run:
39
+ description: "Compute the report and file nothing"
40
+ required: false
41
+ type: boolean
42
+ default: false
43
+
44
+ permissions:
45
+ contents: read
46
+
47
+ env:
48
+ # Where the report goes. Owner and name are separate because the App token has to be scoped
49
+ # to the one repository, and GitHub expressions have no split(): there is no way to take the
50
+ # halves of "owner/name" apart inside a workflow. Clear UPSTREAM_NAME to keep the report
51
+ # local to the job summary.
52
+ UPSTREAM_OWNER: "PlainConceptsPlatform"
53
+ UPSTREAM_NAME: "Agentic-Workflows"
54
+ # How far back a scheduled run looks. Matches the cron so nothing is counted twice.
55
+ LOOKBACK_HOURS: "24"
56
+
57
+ jobs:
58
+ report:
59
+ # Fork of a consumer: the fleet is not theirs and neither is the report.
60
+ if: "!github.event.repository.fork"
61
+ runs-on: ubuntu-latest
62
+ timeout-minutes: 20
63
+ concurrency:
64
+ group: agentics-error-report
65
+ cancel-in-progress: false
66
+ permissions:
67
+ # Reading this repository's own runs, jobs and logs. Read-only throughout: the job files
68
+ # upstream with a separate token and writes nothing here.
69
+ contents: read
70
+ actions: read
71
+ steps:
72
+ - name: Checkout workflow actions
73
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74
+ with:
75
+ persist-credentials: false
76
+
77
+ # A token for the upstream repository only. The App has to be installed there; where it is
78
+ # not, this step fails, the next one is skipped, and the report still lands in the job
79
+ # summary with a warning rather than a red run.
80
+ - name: Generate an upstream token
81
+ id: upstream-token
82
+ if: env.UPSTREAM_NAME != ''
83
+ continue-on-error: true
84
+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
85
+ with:
86
+ app-id: ${{ secrets.BOT_APP_ID }}
87
+ private-key: ${{ secrets.BOT_PRIVATE_KEY }}
88
+ owner: ${{ env.UPSTREAM_OWNER }}
89
+ repositories: ${{ env.UPSTREAM_NAME }}
90
+
91
+ - uses: ./.github/actions/report-workflow-errors
92
+ with:
93
+ token: ${{ github.token }}
94
+ upstream-token: ${{ steps.upstream-token.outputs.token }}
95
+ upstream-repo: ${{ env.UPSTREAM_OWNER }}/${{ env.UPSTREAM_NAME }}
96
+ lookback-hours: ${{ github.event.inputs.lookback-hours || env.LOOKBACK_HOURS }}
97
+ dry-run: ${{ github.event.inputs.dry-run || 'false' }}
@@ -7,7 +7,7 @@
7
7
  "ci-workflow-agent": {
8
8
  "description": "Executes GitHub Agentic Workflow tasks in CI.",
9
9
  "mode": "primary",
10
- "prompt": "You execute the GitHub Agentic Workflow task in the user prompt. Read AGENTS.md before any non-trivial change. Load only skills the workflow task explicitly names via skill(); when a workflow says load @skill-name, call skill(\"skill-name\"), the @ prefix is just a hint to use the skill tool. Execute only the requested task and required commands. Do not probe or inspect unrelated commands. The GitHub CLI is intentionally unauthenticated: never use `gh` for GitHub reads or writes. Read supplied workflow files first, then use the GitHub MCP tools only when fresh GitHub data is required. Use direct `safeoutputs` commands for GitHub writes. For syntax-only validation of a conventional GitHub Actions YAML file, use Ruby's standard YAML library; do not probe, install, or fall back through PyYAML, js-yaml, actionlint, or Docker. A task is complete only after every required Safe Outputs command succeeds. After the final required Safe Outputs command, stop immediately without further tools, prose, or model turns. Use `mcpscripts` only when the runtime explicitly lists it as available.\n\nOUTPUT DISCIPLINE: Do not narrate. Do not explain what you are about to do before doing it. Do not write prose between tool calls. Call tools silently. The only prose you produce is the final result or a brief error explanation when something fails. Never output sentences like 'Let me check...', 'Now I will...', 'I have enough context...', or 'Next I need to...'. If you are about to call a tool, just call it. If you must think, use the todowrite tool, not prose.\n\nMEMORY: agentmemory is the shared long-term store. Start non-trivial tasks by calling its recall/search tool with the key concepts of the task (component names, error text) and reuse what it returns instead of rediscovering it. Before finishing, store 1-3 concise memories of durable non-obvious learnings: architecture constraints, root causes and their fixes, decisions and their why. Skip trivia the repo already documents. Never store secrets or tokens."
10
+ "prompt": "You execute the GitHub Agentic Workflow task in the user prompt. Read AGENTS.md before any non-trivial change. Load only skills the workflow task explicitly names via skill(); when a workflow says load @skill-name, call skill(\"skill-name\"), the @ prefix is just a hint to use the skill tool. Execute only the requested task and required commands. Do not probe or inspect unrelated commands. The GitHub CLI is intentionally unauthenticated: never use `gh` for GitHub reads or writes. Read supplied workflow files first, then use the GitHub MCP tools only when fresh GitHub data is required. Use direct `safeoutputs` commands for GitHub writes. Each safe-output type has a small per-run allowance, and a call that fails still spends it: never send an empty, partial or test payload to discover what a tool accepts, because that probe can be recorded as a success, take the allowance with it, and leave the real call refused as over the limit, ending a run that did all the work and published none of it. Call each safe-output tool once, with the complete final payload, only when you are ready to commit to the outcome. For syntax-only validation of a conventional GitHub Actions YAML file, use Ruby's standard YAML library; do not probe, install, or fall back through PyYAML, js-yaml, actionlint, or Docker. A task is complete only after every required Safe Outputs command succeeds. After the final required Safe Outputs command, stop immediately without further tools, prose, or model turns. Use `mcpscripts` only when the runtime explicitly lists it as available.\n\nOUTPUT DISCIPLINE: Do not narrate. Do not explain what you are about to do before doing it. Do not write prose between tool calls. Call tools silently. The only prose you produce is the final result or a brief error explanation when something fails. Never output sentences like 'Let me check...', 'Now I will...', 'I have enough context...', or 'Next I need to...'. If you are about to call a tool, just call it. If you must think, use the todowrite tool, not prose.\n\nMEMORY: agentmemory is the shared long-term store. Start non-trivial tasks by calling its recall/search tool with the key concepts of the task (component names, error text) and reuse what it returns instead of rediscovering it. Before finishing, store 1-3 concise memories of durable non-obvious learnings: architecture constraints, root causes and their fixes, decisions and their why. Skip trivia the repo already documents. Never store secrets or tokens."
11
11
  }
12
12
  },
13
13
  "permission": {