Repository navigation
[3443 by Claude Opus 5.5] Ship an automation template catalog with an issue-triage template - #3451
Conversation
…" as the first entry. It's available in the shared package, the API, MCP, the CLI and the web UI. All the tests I ran pass. Typecheck is clean, lint passes on the changed files, and the OpenAPI check is up to date. Catalog (`packages/shared`) - Each template has a source folder, `packages/shared/automation-templates/<id>/`, holding `template.json` and `prompt.md`. - `scripts/generate-automation-templates.ts` builds the versioned `automationTemplates.catalog.json` from those folders. It runs as `npm run automation-templates:generate`, and `npm run automation-templates:check` fails if the committed catalog is out of date. - Every template is checked against the automation definition contract, including the schedule rules. It must also default to `dry_run` and list repositories, schedule and autonomy as things to review before saving. - The typed loader, `automationTemplates.ts`, re-validates the catalog when it is imported. I put the validation in a separate file so the generator can check a catalog that isn't committed yet. - CI runs the check through a new test, `test/automationTemplatesCatalog.test.ts`, added to `test:unit` the same way the usage-tips check runs. Daily issue triage - It reads open issues, plus issues closed in the last 30 days, using the run's read-only GitHub token. - The report has these sections: summary, needs a human, likely duplicates, proposed severity labels, proposed security labels, and stale issues. - The prompt forbids changing any issue and says to treat issue text as untrusted. - Suggested schedule is `0 7 * * 1-5` (weekdays 07:00 UTC). It feeds the previous report into the next run so each one focuses on what changed. Where the catalog is available - API: `GET /api/automation-definitions/templates`. I didn't add a deprecated `/api/agent-definitions/...` alias for it, since no old client can depend on a new route. Two existing tests assumed every route has an alias, so I updated them to allow this one exception. - MCP: a read-only tool, `list_automation_templates`. - CLI: `propr automation templates`, which prints a table or a versioned JSON document with `--json`. - Web UI: - The new-automation form has a "Start from a template" picker and a "Review before saving" note. - When there are no automations, the empty list shows the templates. Each one links to `/automations/new?template=<id>`, which opens the form already filled in. - Choosing a template keeps any repositories and coding agent the user already picked, and always sets autonomy to Dry run. Nothing is created until the user saves. Docs: `agents.md` has a new Templates section. I also updated `propr-cli.md`, `docs/mcp.md`, `docs/mcp-coverage.md` and the CHANGELOG, and regenerated the OpenAPI spec. Tests: new or extended tests cover catalog validation, the route, the MCP tool, the CLI command, the form prefill and the empty-state link. The MCP suite's 15 tests all pass, but the process didn't exit on its own afterwards; it stalled on a database-connection timeout during cleanup and I stopped it. That looks like a teardown problem in that suite rather than this change, but I didn't confirm it. I captured three screenshots: the empty list with templates, the prefilled form on desktop, and the template link on a phone.
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements the template catalog across shared code, API, MCP, CLI and UI with consistent defaults and focused test coverage. It is merge-ready within the reviewed scope, conditional on the pending Validate Changes check completing successfully. ✅ Shared validation — Both generation and loading validate templates against the existing automation definition contract, including schedules and required review notes. ✅ Controlled form prefill — Applying a template preserves selected repositories, agent and extension profile, resets autonomy to dry run, and leaves persistence to the existing save action. ✅ Cross-surface coverage — Added tests cover catalog freshness, authenticated API access, MCP discovery, CLI output and UI prefill. This assessment is based on static review of the supplied diff and context. No commands were run. The supplied current-head status reports 34 passed checks, no failures and one pending check. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Clarify incomplete issue retrievalIn S2: 🟢 Document the API response schemaThe new entry in ScoreThe implementation is coherent, preserves the intended save boundary and has relevant coverage across its exposed surfaces. Static review found no demonstrated merge blocker; final readiness remains conditional on the pending check. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3443
Branch:
3443/claude-opus-5-5-ship-an-automation-templa-20261111-2201-h3qCommits: ✅ Changes committed (9f38480)
AI Processing Completed
Execution Details:
Summary:
I've shipped the automation template catalog with "Daily issue triage" as the first entry. It's available in the shared package, the API, MCP, the CLI and the web UI. All the tests I ran pass. Typecheck is clean, lint passes on the changed files, and the OpenAPI check is up to date.
Catalog (
packages/shared)packages/shared/automation-templates/<id>/, holdingtemplate.jsonandprompt.md.scripts/generate-automation-templates.tsbuilds the versionedautomationTemplates.catalog.jsonfrom those folders. It runs asnpm run automation-templates:generate, andnpm run automation-templates:checkfails if the committed catalog is out of date.dry_runand list repositories, schedule and autonomy as things to review before saving.automationTemplates.ts, re-validates the catalog when it is imported. I put the validation in a separate file so the generator can check a catalog that isn't committed yet.test/automationTemplatesCatalog.test.ts, added totest:unitthe same way the usage-tips check runs.Daily issue triage
0 7 * * 1-5(weekdays 07:00 UTC). It feeds the previous report into the next run so each one focuses on what changed.Where the catalog is available
GET /api/automation-definitions/templates. I didn't add a deprecated/api/agent-definitions/...alias for it, since no old client can depend on a new route. Two existing tests assumed every route has an alias, so I updated them to allow this one exception.list_automation_templates.propr automation templates, which prints a table or a versioned JSON document with--json./automations/new?template=<id>, which opens the form already filled in.Docs:
agents.mdhas a new Templates section. I also updatedpropr-cli.md,docs/mcp.md,docs/mcp-coverage.mdand the CHANGELOG, and regenerated the OpenAPI spec.Tests: new or extended tests cover catalog validation, the route, the MCP tool, the CLI command, the form prefill and the empty-state link. The MCP suite's 15 tests all pass, but the process didn't exit on its own afterwards; it stalled on a database-connection timeout during cleanup and I stopped it. That looks like a teardown problem in that suite rather than this change, but I didn't confirm it.
I captured three screenshots: the empty list with templates, the prefilled form on desktop, and the template link on a phone.
Detailed Logs:
5f89f1ed-8bd1-427a-a5df-2546c0a31f23Log files stored at:
/usr/src/app/logs/executions/issue-3443-2026-11-11T22-26-09-440Z-conversation.json/usr/src/app/logs/executions/issue-3443-2026-11-11T22-26-09-440Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3443.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Empty Automations list with templates
With no automations, the empty state offers "Or start from a template" with the Daily issue triage card (1440x900).
Connect sign-in required. Original retained until 2027-02-09T22:26:13.968Z.
View the full-resolution original in ProPR Connect
New automation prefilled from Daily issue triage
After choosing the template under "Start from a template": the form is filled in, autonomy stays Dry run, and a "Review before saving" note lists repositories, schedule and autonomy. Nothing is created until Create automation.
Connect sign-in required. Original retained until 2027-02-09T22:26:15.230Z.
View the full-resolution original in ProPR Connect
Template link on a phone
/automations/new?template=daily-issue-triage at 390x844 opens the form prefilled, with the review note first.
Connect sign-in required. Original retained until 2027-02-09T22:26:16.763Z.
View the full-resolution original in ProPR Connect