From 2a25ac57c9ab7e145599263be42f6ff39c2c46f5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:17:33 +0000 Subject: [PATCH 1/6] Add wizard JSON configuration Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- src/js/main.js | 2 +- src/js/wizard-config.js | 25 +++++ src/wizard.json | 207 ++++++++++++++++++++++++++++++++++++++++ vite.config.js | 6 ++ 4 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 src/js/wizard-config.js create mode 100644 src/wizard.json diff --git a/src/js/main.js b/src/js/main.js index 82b6a22..8fe941f 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -2,4 +2,4 @@ import { initWizard } from './ui.js'; -document.addEventListener('DOMContentLoaded', initWizard); +document.addEventListener('DOMContentLoaded', () => initWizard()); diff --git a/src/js/wizard-config.js b/src/js/wizard-config.js new file mode 100644 index 0000000..d6117ab --- /dev/null +++ b/src/js/wizard-config.js @@ -0,0 +1,25 @@ +export const WIZARD_CONFIG_URL = 'wizard.json'; + +export function loadWizardConfig(configUrl, fetchImpl) { + const url = configUrl || WIZARD_CONFIG_URL; + const request = fetchImpl || fetch; + return request(url).then((response) => { + if (!response.ok) throw new Error('Unable to load wizard configuration'); + return response.json(); + }); +} + +export function resolveWizardAssetUrl(assetUrl, configUrl) { + if (!assetUrl) return null; + const base = configUrl || WIZARD_CONFIG_URL; + return new URL(assetUrl, new URL(base, document.baseURI)).href; +} + +export function wizardStep(config, id) { + return config && config.steps && config.steps[id] ? config.steps[id] : {}; +} + +export function wizardOptions(config, id) { + const step = wizardStep(config, id); + return Array.isArray(step.options) ? step.options : []; +} diff --git a/src/wizard.json b/src/wizard.json new file mode 100644 index 0000000..54c15c2 --- /dev/null +++ b/src/wizard.json @@ -0,0 +1,207 @@ +{ + "patterns_url": "patterns/manifest.json", + "engines_url": "https://raw.githubusercontent.com/github/gh-aw/main/.github/aw/engines.json", + "archetypes": { + "pinned": [ + "skill-pr-reviewer", + "code-improvement", + "daily-test-improver", + "documentation-updater" + ], + "aliases": { + "pr reviewer": "skill-pr-reviewer", + "daily code improver": "code-improvement", + "daily test generator": "daily-test-improver", + "documentation updater": "documentation-updater" + }, + "custom": { + "id": "custom", + "label": "Custom", + "description": "Describe your own workflow — start from scratch", + "icon": "tools", + "full_width": true + } + }, + "steps": { + "trigger": { + "placeholder": "choose when it runs", + "options": [ + { + "id": "issues", + "label": "New issue opened", + "description": "Runs when an issue is created", + "icon": "issue-opened", + "summary": "a new issue is opened" + }, + { + "id": "pull_request", + "label": "Pull request opened", + "description": "Runs when a PR is created", + "icon": "git-pull-request", + "summary": "a pull request is opened" + }, + { + "id": "pull_request_ready_for_review", + "label": "PR ready for review", + "description": "Runs when a draft PR is marked ready for review", + "icon": "git-pull-request", + "summary": "a pull request is ready for review" + }, + { + "id": "schedule", + "label": "On a schedule (daily/weekly)", + "description": "Runs on a cron schedule", + "icon": "calendar", + "summary": "the schedule runs" + }, + { + "id": "slash_command", + "label": "Slash command (/slash-command in comments)", + "description": "Runs when a matching slash command is posted", + "icon": "terminal", + "summary": "a slash command is posted (not recommended)" + }, + { + "id": "label_command", + "label": "Label command (/label-command)", + "description": "Runs when a matching label is added", + "icon": "tag", + "summary": "a matching label is added" + }, + { + "id": "push", + "label": "Push to branch", + "description": "Runs when code is pushed", + "icon": "git-commit", + "summary": "code is pushed to main" + } + ] + }, + "output": { + "placeholder": "choose what it can write", + "options": [ + { + "id": "create-issue", + "label": "Create issue", + "description": "Create new issues for tracking or reporting", + "icon": "issue-opened", + "summary": "create issue" + }, + { + "id": "add-comment", + "label": "Add comment", + "description": "Post comments with analysis, feedback, or results", + "icon": "comment-discussion", + "summary": "add comment" + }, + { + "id": "add-labels", + "label": "Add label", + "description": "Add labels on issues", + "icon": "tag", + "summary": "add label" + }, + { + "id": "create-pull-request", + "label": "Create pull request", + "description": "Open pull requests with code changes", + "icon": "git-pull-request", + "summary": "create pull request" + }, + { + "id": "create-pull-request-review-comment", + "label": "Add review comment", + "description": "Leave review comments on pull request diffs", + "icon": "eye", + "summary": "add review comment" + } + ] + }, + "extra": { + "placeholder": "choose optional capabilities", + "options": [ + { + "id": "memory", + "label": "Remember across runs", + "description": "Track trends and context between workflow executions", + "icon": "cache", + "summary": "memory between runs" + }, + { + "id": "charts", + "label": "Generate charts", + "description": "Upload generated charts and other visual assets", + "icon": "graph", + "summary": "chart generation" + }, + { + "id": "browser", + "label": "Use browser", + "description": "Enable Playwright CLI for browser automation", + "icon": "device-desktop", + "summary": "browser access" + } + ] + }, + "engine": { + "placeholder": "choose an agent", + "options": [ + { + "id": "copilot", + "label": "Copilot", + "company": "GitHub", + "icon": "vendor-github" + }, + { + "id": "claude", + "label": "Claude", + "company": "Anthropic", + "icon": "vendor-anthropic" + }, + { + "id": "codex", + "label": "Codex", + "company": "OpenAI", + "icon": "vendor-openai" + }, + { + "id": "gemini", + "label": "Gemini", + "company": "Google", + "icon": "vendor-google" + }, + { + "id": "pi", + "label": "Pi", + "company": "Inflection", + "icon": "vendor-pi" + } + ] + }, + "purpose": { + "placeholder": "choose what the agent should do" + } + }, + "recommendations": { + "triggers": [ + "issues", + "pull_request", + "schedule", + "slash_command", + "label_command", + "push" + ], + "safe_outputs": { + "add-comment": ["add-comment"], + "add-label": ["add-labels"], + "add-labels": ["add-labels"], + "create-issue": ["create-issue"], + "create-pull-request": ["create-pull-request"], + "create-pull-request-review-comment": ["create-pull-request-review-comment"], + "commit-files": ["create-pull-request"], + "issues": ["add-comment", "add-labels", "create-issue"], + "pull-requests": ["create-pull-request", "add-comment", "create-pull-request-review-comment"], + "contents": ["create-pull-request"] + } + } +} diff --git a/vite.config.js b/vite.config.js index 7f87a9d..e8e7830 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,6 +4,7 @@ import { join, posix } from 'node:path'; import { defineConfig } from 'vite'; const patternsDir = fileURLToPath(new URL('./patterns', import.meta.url)); +const wizardConfig = fileURLToPath(new URL('./src/wizard.json', import.meta.url)); // patterns/ lives at the repo root (it is regenerated by the deep research // workflow) as one manifest plus one file per archetype, so its contents are @@ -33,6 +34,11 @@ function patternsPlugin() { }); }, generateBundle() { + this.emitFile({ + type: 'asset', + fileName: 'wizard.json', + source: readFileSync(wizardConfig, 'utf8') + }); listPatternsFiles().forEach((relativePath) => { this.emitFile({ type: 'asset', From f2e661e9846808629c5da08d57f6033e79927e5f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:20:57 +0000 Subject: [PATCH 2/6] Render wizard from JSON data Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- README.md | 32 +++++++ src/index.html | 148 ++---------------------------- src/js/engines.js | 11 ++- src/js/patterns.js | 40 +++------ src/js/summary.js | 71 +++++---------- src/js/ui.js | 179 ++++++++++++++++++++++++++----------- src/wizard.json | 7 ++ test/a11y.test.js | 76 ++++++++-------- test/patterns.test.js | 13 ++- test/summary.test.js | 23 +++-- test/ui.test.js | 63 ++++++++++++- test/wizard-config.test.js | 46 ++++++++++ 12 files changed, 385 insertions(+), 324 deletions(-) create mode 100644 test/wizard-config.test.js diff --git a/README.md b/README.md index 6e8400f..f8db743 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,38 @@ A wizard interface to create GitHub Agentic Workflows. Create ready-to-use [GitHub Agentic Workflows](https://github.github.com/gh-aw/) in minutes — just answer a few questions and get a workflow file you can drop into your repo. +## Customize the wizard + +The dashboard is rendered at runtime from [`src/wizard.json`](src/wizard.json). The file defines the +archetype ordering, trigger/output/extra/engine cards, summary text, recommendation mappings, and +the URLs of the pattern library and engine catalog. + +To host a customized wizard in another repository: + +1. Run `npm run build` and publish the contents of `dist/`. +2. Edit the published `wizard.json` without rebuilding the JavaScript bundle. +3. Point `patterns_url` at a compatible pattern manifest. Relative URLs are resolved from the + location of `wizard.json`, so the configuration and its pattern library can be hosted together. + +The default page reads the configuration URL from: + +```html + +``` + +An embedding application can instead call `initWizard({ configUrl })`. Cross-origin configuration, +pattern, and engine endpoints must allow the embedding origin with CORS headers. Option IDs should +match definitions in the configured pattern library's `workflow-generation.json`. + +## Development + +```bash +npm install +npm run dev +npm test +npm run build +``` + ## License MIT diff --git a/src/index.html b/src/index.html index d25da6f..aa1c9ca 100644 --- a/src/index.html +++ b/src/index.html @@ -3,6 +3,7 @@
+