Skip to content

feat: redesign for current awesome-copilot structure#1

Open
CTOUT wants to merge 32 commits intomainfrom
feat/awesome-copilot-redesign
Open

feat: redesign for current awesome-copilot structure#1
CTOUT wants to merge 32 commits intomainfrom
feat/awesome-copilot-redesign

Conversation

@CTOUT
Copy link
Owner

@CTOUT CTOUT commented Feb 27, 2026

Summary

Complete redesign of the sync toolset to align with the current awesome-copilot repository structure, plus a full interactive configuration pipeline.

What's New

configure.ps1 — single entry point

powershell .\configure.ps1 # sync + publish + prompt for repo init .\configure.ps1 -SkipInit # sync + publish only .\configure.ps1 -InstallTask # sync + publish + install scheduled task .\configure.ps1 -InstallTask -Every '2h' .\configure.ps1 -DryRun # preview all steps without writing files

  • -InstallTask / -UninstallTask automatically skip the init-repo prompt
  • Prompts before overwriting an existing scheduled task

scripts/sync-awesome-copilot.ps1 — rewritten around git sparse-checkout

Replaced 700+ individual GitHub API/HTTP calls with a single git sparse-checkout clone:

  • First run: gh repo clone (preferred) or git clone with --depth 1 --filter=blob:none --sparse
  • Subsequent runs: git pull — near-instant delta updates
  • Prefers gh CLI (auto auth); falls back to git; -GitTool param to override
  • No GitHub API rate limiting concerns; auto-migrates from old API-based cache
  • Logs always written to scripts/logs/ via $PSScriptRoot
  • Resilient pull: detects unrelated histories (e.g. remote force-push) and automatically recovers via git fetch + git reset --hard origin/HEAD

scripts/publish-global.ps1 — agents + skills

  • Junction from VS Code agents folder (%APPDATA%\Code\User\prompts) to local cache — updates reflect immediately
  • Incremental mirror of skills to ~/.copilot/skills/
  • Auto-configures chat.useAgentSkills and chat.agentSkillsLocations in VS Code settings.json
  • WARN log if settings.json not found (directs user to open VS Code once)

scripts/init-repo.ps1 — per-repo interactive setup

  • Installs agents, instructions, hooks, agentic workflows to .github/
  • Auto-detects repo stack (C#, Python, TypeScript, Go, Docker, etc.) — marks recommendations with ★
  • -- none / skip -- sentinel row prevents accidental installs
  • Falls back to numbered console menu where Out-GridView unavailable

Changed / Fixed

  • All scripts use $PSScriptRoot consistently (replaces \System.Management.Automation.InvocationInfo.MyCommand.Path)
  • sync-awesome-copilot.ps1: Get-FileHash replaces manual SHA256
  • sync-awesome-copilot.ps1: recovers gracefully from unrelated histories on git pull
  • install-scheduled-task.ps1: -WorkingDirectory on task actions (fixed red flash on task run); $PSScriptRoot in param defaults
  • configure.ps1: task validation before Step 1 (init-repo prompt correctly skipped); overwrite prompt on existing task
  • publish-global.ps1: correct agents target path (prompts\ not ^Gagents)
  • init-repo.ps1: [Array]::IndexOf fix, OGV column name fix, sentinel row
  • All four major scripts have #region/#endregion labels for VS Code folding
  • CONTRIBUTING.md, README.md, CHANGELOG.md: removed stale script references, fixed paths and param names

Removed

ormalize-copilot-folders.ps1, combine-and-publish-prompts.ps1, publish-to-vscode-profile.ps1 — superseded

  • GitHub API rate-limit logic, per-file download loop, backup zip snapshots

Testing

Tested end-to-end on Windows 11 with PowerShell 7.4 and gh CLI:

  • .\configure.ps1 — sync (pull, 692 files unchanged) + publish + init-repo
  • .\configure.ps1 -InstallTask — skips init, prompts on existing task, installs cleanly
  • Scheduled task runs without errors; logs land in scripts/logs/
  • .\configure.ps1 -DryRun — all steps preview correctly
  • Unrelated histories recovery: pull failure correctly detected, fetch+reset applied, sync completes successfully

CTOUT and others added 30 commits February 26, 2026 17:37
The awesome-copilot repository was reorganised -- chatmodes/ and prompts/
no longer exist. Resources are now split into flat categories (agents,
instructions, workflows) and subdirectory-based packages (skills, hooks,
plugins, cookbook). This commit updates all scripts to reflect that
structure and introduces a cleaner global-vs-per-repo publishing model.

New scripts:
- publish-global.ps1: publishes agents to the VS Code user agents folder
  (via junction so sync updates are reflected immediately) and skills to
  ~/.copilot/skills/; supports -DryRun, -SkipAgents, -SkipSkills,
  -AgentsTarget, -SkillsTarget
- init-repo.ps1: interactive per-repo initialiser; lets you select
  instructions, hooks, workflows and project-level skills from the local
  cache and installs them into .github/ subfolders; uses Out-GridView
  with a numbered console-menu fallback; supports -RepoPath, -DryRun,
  skip flags and pre-selection parameters

Updated scripts:
- sync-awesome-copilot.ps1: default categories changed to
  agents,instructions,workflows,hooks,skills; added Get-RepoFiles
  recursive traversal for subdirectory-based categories; added .sh to
  extension filter (required for hooks to function)
- install-scheduled-task.ps1: default categories updated; -SkipCombine
  replaced by -SkipPublishGlobal; -IncludeCollections replaced by
  -IncludePlugins; second scheduled action now runs publish-global.ps1
- normalize-copilot-folders.ps1: added *.agent.md -> agents/ classification

Removed:
- combine-and-publish-prompts.ps1: superseded by publish-global.ps1 and
  init-repo.ps1
- publish-to-vscode-profile.ps1: only handled chatmodes/ and prompts/
  which no longer exist in awesome-copilot

Design rationale: agents and skills are global (agents available across
all VS Code workspaces; skills loaded on-demand without noise);
instructions/hooks/workflows are per-repo opt-in via init-repo.ps1 to
avoid contradicting instruction files being active everywhere.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Inquire causes the script to pause and wait for interactive input on
any unhandled error, which hangs scheduled task runs indefinitely.
Stop ensures errors are terminating and handled by existing try/catch blocks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skills are available globally via publish-global.ps1 (~/.copilot/skills/).
There is no value in copying point-in-time versions into .github/skills/ -
users should reference the source at github/awesome-copilot directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documents the ErrorActionPreference fix and skills removal from init-repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-detects language/framework from repo file signals and pre-marks
recommended instructions/hooks/workflows with ★ in the picker.
For new/empty repos, prompts for intent one question at a time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Auto-detects language/framework from repo file signals and pre-marks
recommended instructions/hooks/workflows with star in the Rec column,
sorted to the top of the picker. For new/empty repos, prompts for
intent one question at a time (stack, project type, concerns).

Also fixes Out-GridView column name bug (non-alphanumeric names cause
WPF property path errors).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
'return if (...)' is not valid PowerShell at runtime despite passing
the parser. Replace with explicit if/else return statements.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added security-and-owasp and powershell instructions to .github/instructions/
as detected by init-repo.ps1 from repo signals.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Covers script workflow order, logging/error/dry-run/change-detection
conventions, portable path requirements, external dependencies,
cache structure, and contributing guidelines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code discovers global custom agents from ~/.copilot/agents/ not
%APPDATA%\Code\User\agents\. Also removed stale wrong-path junction.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
VS Code 'Configure Custom Agents > User Data' navigates to this path.
Previous guesses (%APPDATA%\Code\User\agents and ~/.copilot/agents)
were both incorrect.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds per-repo agent selection (.github/agents/) as a fourth category
alongside instructions, hooks and workflows. Stack detection and
intent prompting both recommend relevant agents. Useful for sharing
a curated agent set with teammates who don't run the global sync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
After publishing skills, automatically sets chat.useAgentSkills=true
and adds ~/.copilot/skills/** to chat.agentSkillsLocations in VS Code
user settings.json if not already configured.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prepends a '-- none / skip --' sentinel row to each Out-GridView
picker so clicking OK with no intentional selection installs nothing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Scripts:
- normalize-copilot-folders.ps1: fix Split-Path -LeafParent (invalid param) -> -Parent
- install-scheduled-task.ps1: remove -Quiet from publish-global args (param doesn't exist)
- init-repo.ps1: fix [Array]::IndexOf() in console-menu fallback (no instance method)
- publish-global.ps1: update stale 'CCA' comment -> 'VS Code Agent mode / Copilot CLI'

Documentation:
- README.md: -Interval -> -Every; fix -ProfileName -> -ProfileRoot/-AllProfiles;
  agents path -> %APPDATA%\Code\User\prompts\; update init-repo section with
  agents category and smart detection; fix custom AgentsTarget example path
- copilot-instructions.md: correct agents path agents\ -> prompts\
- CHANGELOG.md: add v1.1.2 entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Script was designed to fix misplaced files across VS Code profile
chatmodes/prompts folders from the v1.0 architecture. These categories
no longer exist in awesome-copilot. Agents are now published via
junction (always correct), skills via direct copy, per-repo resources
via init-repo.ps1. No remaining use case.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…NGELOG

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Chains sync-awesome-copilot -> publish-global -> init-repo in a single
interactive command. Each step is independently skippable (-SkipSync,
-SkipPublish, -SkipInit). -DryRun passes through to all child scripts.
Shows last sync timestamp from cache manifest before running.

Also updates README quick-start to lead with update.ps1 and adds
update.ps1 to the scripts overview section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move all implementation scripts to scripts/ subfolder
- Replace update.ps1 with configure.ps1 at repo root as single entry point
- configure.ps1 chains sync -> publish -> init-repo (prompted) with
  explicit -InstallTask / -UninstallTask / -Every switches for task mgmt
- Update README, copilot-instructions.md to reflect new structure
- .gitignore: add .awesome-copilot/ local cache and temp file patterns

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Clone github/awesome-copilot with --depth 1 --filter=blob:none --sparse
  on first run; subsequent runs use git pull (delta only)
- Prefers gh CLI (auto auth); falls back to git; -GitTool param to override
- Removes ~700 individual HTTP requests in favour of a single bulk transfer
- Removes GitHub API rate-limit concerns entirely
- Migrates existing non-git cache automatically (renames to backup dir)
- Removes -NoDelete, -DiffOnly, -SkipBackup, -BackupRetention (git handles these)
- manifest.json still written from local file scan for backward compat

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…paths

- install-scheduled-task.ps1: update task description (remove 'combine')
- publish-global.ps1: fix profile path example (agents -> prompts)
- README: fix default interval (6h -> 4h), replace GitHub rate-limit section
  with gh/git auth notes, fix custom repo instructions, fix log path,
  update file naming conventions, remove legacy chatmode/prompt references
- copilot-instructions.md: update sync description (API -> git clone/pull),
  replace GITHUB_TOKEN/rate-limit section with gh/git note, update cache
  structure (remove last-success.json, backups/, fix logs/ location)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sk is set

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…effect

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… dir

Without this the task ran from C:\Windows\System32, causing the relative
'logs/' path in sync-awesome-copilot.ps1 to fail with a permissions error
(the brief red flash seen on task execution).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously logs were written relative to CWD, creating two separate logs/
folders (repo root for interactive runs, scripts/ for scheduled task).
Now always writes to scripts/logs/ via \ regardless of CWD.
Removed root logs/ directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- configure.ps1: use \ (cleaner than \System.Management.Automation.InvocationInfo.MyCommand.Path)
- sync: replace manual SHA256 with Get-FileHash (built-in, no file read into memory)
- publish-global: WARN when VS Code settings.json not found instead of silent skip

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ample

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
configure.ps1:       Initialisation | Step 1-4
sync-awesome-copilot.ps1: Initialisation | Tool detection | Clone or pull |
                          File scan and change detection | Write manifest and status |
                          Log retention
publish-global.ps1:  Initialisation | Agents | Skills
init-repo.ps1:       Initialisation | Stack detection | Intent prompt |
                     Path validation and stack detection | Helpers |
                     Catalogue builders | Agents | Instructions |
                     Hooks | Workflows | Summary

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CTOUT and others added 2 commits February 27, 2026 16:22
- CONTRIBUTING.md: replace removed scripts with current configure.ps1 workflow,
  fix -Interval -> -Every, fix log path (C:\Users\Chris.Tout\.awesome-copilot\logs -> scripts\logs)
- CHANGELOG.md: fix update.ps1 -> configure.ps1 in v1.1.2 entry
- README.md: fix 'cd scripts' -> 'cd vscode-copilot-sync' in Quick Start
- install-scheduled-task.ps1: use \ in param defaults
  (replaces \System.Management.Automation.InvocationInfo.MyCommand.Path, consistent with other scripts)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the remote history has diverged (e.g. force-push), fall back to
git fetch + reset --hard origin/HEAD instead of failing with exit 128.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@CTOUT CTOUT force-pushed the feat/awesome-copilot-redesign branch from 1f1b1c4 to bc87144 Compare March 2, 2026 13:15
@CTOUT CTOUT force-pushed the feat/awesome-copilot-redesign branch from bc87144 to 5cef34e Compare March 2, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant