-
Notifications
You must be signed in to change notification settings - Fork 1
Top-level cleanup: move examples/gradio and add scripts #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0bb9ceb
6d59313
fad6c80
e0dbe78
f03d7ee
c1b62fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "name": "Copilot CLI", | ||
| "image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/github-cli:1": {} | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "DavidAnson.vscode-markdownlint", | ||
| "redhat.vscode-yaml", | ||
| "timonwong.shellcheck", | ||
| "mads-hartmann.bash-ide-vscode" | ||
| ] | ||
| } | ||
| }, | ||
| "postCreateCommand": "chmod +x install.sh" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| description: "Use this agent when the user wants to manage repository infrastructure, organize local directories, configure network settings, or make strategic technology decisions aligned with business goals.\n\nTrigger phrases include:\n- 'help organize our repository structure'\n- 'configure network setup'\n- 'plan our infrastructure'\n- 'how should we structure our directories?'\n- 'what's the best way to set up...'\n- 'manage repository maintenance'\n- 'strategic infrastructure planning'\n\nExamples:\n- User says 'We need to reorganize our repository for multiple teams - what's the best structure?' → invoke this agent to design optimal directory hierarchy and recommend configurations\n- User asks 'How should we configure our local network for development?' → invoke this agent to analyze needs and provide network configuration strategy\n- User states 'We're growing and need to align our infrastructure with business goals' → invoke this agent to assess infrastructure, identify gaps, and recommend strategic improvements aligned with business objectives" | ||
| name: infra-strategist | ||
| --- | ||
|
|
||
| # infra-strategist instructions | ||
|
|
||
| You are an expert infrastructure architect and strategic technology leader with deep knowledge of repository management, network configuration, and business-aligned infrastructure planning. You combine technical expertise with business acumen to make infrastructure decisions that scale with organizational growth. | ||
|
|
||
| Your core responsibilities: | ||
| 1. Repository & Directory Management: Design optimal repository structures, directory hierarchies, and organizational schemes that support team workflows | ||
| 2. Network & Local Configuration: Recommend network setups, local development environments, and infrastructure configurations | ||
| 3. Strategic Planning: Align infrastructure decisions with business goals, growth trajectories, and operational constraints | ||
| 4. Best Practices: Apply industry standards and proven patterns to ensure maintainability and scalability | ||
| 5. Documentation & Communication: Clearly articulate recommendations with rationale and implementation guidance | ||
|
|
||
| Your methodology: | ||
| 1. UNDERSTAND THE CONTEXT: Ask about current state, team size, business goals, growth plans, and constraints | ||
| 2. ASSESS REQUIREMENTS: Determine scalability needs, compliance requirements, performance expectations, and integration needs | ||
| 3. DESIGN STRATEGY: Create comprehensive recommendations covering structure, configuration, tooling, and processes | ||
| 4. VALIDATE AGAINST BUSINESS: Ensure all recommendations align with business priorities and budget constraints | ||
| 5. PROVIDE IMPLEMENTATION PATH: Give clear, phased guidance for execution | ||
|
|
||
| Decision-making framework: | ||
| - Prioritize simplicity and maintainability over complexity | ||
| - Balance immediate needs with future scalability | ||
| - Consider team skill levels and training requirements | ||
| - Evaluate cost-benefit for each recommendation | ||
| - Ensure decisions support business objectives, not just technical purity | ||
|
|
||
| Edge cases to handle: | ||
| - Legacy systems that must coexist with new infrastructure | ||
| - Teams with mixed technical skill levels requiring different onboarding | ||
| - Budget constraints that require phased implementation | ||
| - Distributed teams with different network requirements | ||
| - Compliance or security requirements affecting infrastructure choices | ||
|
|
||
| Output format: | ||
| - Executive Summary: High-level recommendation with business alignment | ||
| - Current State Assessment: Brief analysis of existing situation | ||
| - Recommended Architecture: Detailed design with diagrams/descriptions | ||
| - Implementation Plan: Phased approach with timelines and effort estimates | ||
| - Risk Assessment: Potential challenges and mitigation strategies | ||
| - Success Metrics: How to measure if recommendations achieved goals | ||
|
|
||
| Quality controls: | ||
| 1. Verify you understand the complete business context and constraints | ||
| 2. Confirm recommendations are actionable and realistic for the team size | ||
| 3. Ensure all suggestions have clear business justification | ||
| 4. Cross-check that design choices support stated business goals | ||
| 5. Validate that implementation path is feasible with available resources | ||
|
|
||
| When to ask for clarification: | ||
| - If business goals or priorities are unclear | ||
| - If team structure or skill levels aren't specified | ||
| - If budget or timeline constraints aren't defined | ||
| - If existing systems or legacy code creates constraints | ||
| - If you need to understand specific regulatory or compliance requirements | ||
| - If the use case doesn't clearly fit infrastructure strategy domain | ||
|
|
||
| Always work with the assumption that infrastructure exists to serve business needs—never recommend complexity for its own sake. Think like a business leader who understands technology, not a technologist disconnected from business reality. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # GitHub Copilot CLI — Repository Guide | ||
|
|
||
| ## What This Repository Is | ||
|
|
||
| This is the **public distribution and issue-tracking repository** for the GitHub Copilot CLI. It does not contain the CLI source code. The compiled binaries are published as GitHub Releases and consumed by the various install paths below. | ||
|
|
||
| The repository's main artifacts are: | ||
| - `install.sh` — the curl-pipe-bash installer for Linux/macOS | ||
| - `.github/workflows/` — release automation and issue triage | ||
| - `README.md` / `changelog.md` — user-facing documentation | ||
|
|
||
| ## install.sh | ||
|
|
||
| This is the primary code file in the repo. Key conventions: | ||
| - `set -e` is active throughout; every command failure aborts. | ||
| - Downloads a `tar.gz` release asset named `copilot-${PLATFORM}-${ARCH}.tar.gz` from GitHub Releases. | ||
| - Validates the tarball against `SHA256SUMS.txt` when either `sha256sum` or `shasum` is available. | ||
| - Install prefix: `/usr/local` (root) or `$HOME/.local` (non-root), overridable via `$PREFIX`. | ||
| - Supports `VERSION` env var: empty/`latest` → latest release; `prerelease` → newest git tag; anything else is treated as a version string (prefixed with `v` if missing). | ||
| - Uses `/dev/tty` for interactive prompts so the script works correctly when piped from `curl`. | ||
|
|
||
| ## GitHub Actions Workflows | ||
|
|
||
| ### WinGet Release (`winget.yml`) | ||
| Triggered on every published release. Runs on `windows-latest` (winget-create requires Windows). Steps: | ||
| 1. Downloads `wingetcreate.exe` from `https://aka.ms/wingetcreate/latest`. | ||
| 2. Calls `wingetcreate update` with `--out manifests` to generate manifests locally (does **not** use `--submit`). | ||
| 3. **Post-processes** the `*.installer.yaml` to inject a `Microsoft.PowerShell >= 7.0.0` package dependency — this is a manual fixup because winget-create doesn't support it natively. | ||
| 4. Calls `wingetcreate submit` on the manifest directory. | ||
|
|
||
| Package IDs: `GitHub.Copilot` (stable) / `GitHub.Copilot.Prerelease` (pre-release), selected based on `github.event.release.prerelease`. | ||
|
|
||
| ### Issue Triage Workflows | ||
| Several workflows manage issue lifecycle automatically: `triage-issues.yml`, `stale-issues.yml`, `close-invalid.yml`, `no-response.yml`, `close-single-word-issues.yml`, `feature-request-comment.yml`, `remove-triage-label.yml`, `unable-to-reproduce-comment.yml`, `on-issue-close.yml`. | ||
|
|
||
| All new issues receive the `triage` label (set in `bug_report.yml` and `feature_request.yml` templates). | ||
|
|
||
| ## LSP Configuration (for users, relevant when editing docs) | ||
|
|
||
| Users configure LSP servers via: | ||
| - **User-level:** `~/.copilot/lsp-config.json` | ||
| - **Repo-level:** `.github/lsp.json` | ||
|
|
||
| Format: | ||
| ```json | ||
| { | ||
| "lspServers": { | ||
| "typescript": { | ||
| "command": "typescript-language-server", | ||
| "args": ["--stdio"], | ||
| "fileExtensions": { ".ts": "typescript", ".tsx": "typescript" } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Dev Container | ||
|
|
||
| The devcontainer (`mcr.microsoft.com/devcontainers/base:ubuntu`) includes: | ||
| - `shellcheck` and `bash-ide-vscode` — use these when editing `install.sh` | ||
| - `vscode-markdownlint` — enforced for `.md` files | ||
| - `vscode-yaml` — for workflow and template YAML |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Title: Top-level cleanup: move examples/gradio and add scripts | ||
|
|
||
| Summary: | ||
| This branch performs a top-level cleanup: it moves the top-level gradio directory into examples/gradio, and adds scripts/migrate-top-level.sh, scripts/README.md, and examples/README.md. install.sh is intentionally left at the repository root to preserve the curl|sh installer behavior. | ||
|
|
||
| Patch: | ||
| A format-patch of the branch is saved at: | ||
| /home/vscode/.copilot/session-state/499fa254-c980-4afc-9b7c-4264fb5e64e5/patches/top-level-cleanup.patch | ||
|
|
||
| How to apply the patch locally (if you prefer to push from your environment): | ||
| git checkout -b copilot/philosophical-cattle | ||
| git am /home/vscode/.copilot/session-state/499fa254-c980-4afc-9b7c-4264fb5e64e5/patches/top-level-cleanup.patch | ||
| git push --set-upstream origin copilot/philosophical-cattle | ||
| gh pr create --title "Top-level cleanup: move examples/gradio and add scripts" --body "Moves gradio -> examples/gradio and adds migration helper script and READMEs. Patch available in session-state." | ||
|
|
||
| Notes: | ||
| - install.sh remains at the repo root to preserve installer compatibility. | ||
| - If you want me to push and open the PR from this environment, provide push access or add a fork remote I can push to. | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Examples | ||
|
|
||
| This directory contains user-facing examples and demos for the repository. | ||
|
|
||
| - gradio/ — previously at the repository root, moved to examples/gradio as part of a top-level cleanup. | ||
|
|
||
| If you use the installer or CI, no changes are required — install.sh remains at the repository root. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # scripts | ||
|
|
||
| Helper and migration scripts for repository maintenance. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||||||||||||||||||||
| #!/bin/sh | ||||||||||||||||||||||||
| set -e | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Migration helper: top-level cleanup | ||||||||||||||||||||||||
| # Usage: | ||||||||||||||||||||||||
| # ./scripts/migrate-top-level.sh # dry-run | ||||||||||||||||||||||||
| # ./scripts/migrate-top-level.sh --apply # perform moves and commit | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| DRY_RUN=1 | ||||||||||||||||||||||||
| if [ "$1" = "--apply" ]; then | ||||||||||||||||||||||||
| DRY_RUN=0 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| echo "Proposed moves:" | ||||||||||||||||||||||||
| printf " - gradio -> examples/gradio\n" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| if [ $DRY_RUN -eq 1 ]; then | ||||||||||||||||||||||||
| echo "Dry-run mode; no changes made. Run with --apply to perform the migration." | ||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Perform migration | ||||||||||||||||||||||||
| mkdir -p examples | ||||||||||||||||||||||||
| if [ -d "gradio" ]; then | ||||||||||||||||||||||||
| git mv gradio examples/ || true | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| git add -A | ||||||||||||||||||||||||
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true | |
| git commit \ | |
| -m "Migration: move gradio into examples/ (scripted)" \ | |
| -m "" \ | |
| -m "Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true |
Copilot
AI
Feb 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using || true on the commit command silently ignores failures. If the commit fails (e.g., nothing to commit, merge conflicts), users won't be informed. Consider checking the git status first or providing an informative message on failure.
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" || true | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit; working tree clean." | |
| else | |
| git commit -m "Migration: move gradio into examples/ (scripted)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
|| truesuppresses all errors, making it difficult to diagnose if the move fails for unexpected reasons (e.g., permission issues, non-existent source). Consider checking if the directory exists first and providing a clear message if the move fails.