Skip to content

feat: Custo MVP — config-driven AGENTS.md sync to PSModule module repos - #2

Closed
Marius Storhaug (MariusStorhaug) wants to merge 5 commits into
mainfrom
custo-mvp-agents-sync
Closed

feat: Custo MVP — config-driven AGENTS.md sync to PSModule module repos#2
Marius Storhaug (MariusStorhaug) wants to merge 5 commits into
mainfrom
custo-mvp-agents-sync

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Summary

Delivers the Custo MVP: a production-usable managed-file sync runtime that distributes AGENTS.md to PSModule module repositories via pull requests.

What's included

Item Path
Sync workflow .github/workflows/sync-files.yml
Sync script (config-driven) scripts/Sync-Files.ps1
Target org config config/targets.json
AGENTS.md file set Repos/Module/AGENTS.md/AGENTS.md
Updated README README.md

Behavior preserved from PSModule/Distributor

  • Discovers file sets from Repos/<Type>/<SetName>/ structure
  • Resolves repositories by Type + SubscribeTo GitHub Custom Properties
  • Creates/updates PR titled ⚙️ [Maintenance]: Sync managed files on branch managed-files/update
  • No duplicate PRs — open PR is updated in-place
  • No implicit deletes — only files in selected sets are touched

Config-driven change

scripts/Sync-Files.ps1 now reads target orgs from config/targets.json instead of hardcoding a single org. MVP targets: ["PSModule"].

AGENTS.md content

Thin pointer to PSModule/docs and MSXOrg/docs — no duplicated long process text. Includes a managed-file banner so repo maintainers know not to edit locally.

Blockers for live rollout

Before running the workflow, an operator must:

  1. Create GitHub App (Custo Bot) under MSXOrg with Contents R/W, Pull Requests R/W, Metadata R permissions.
  2. Install app on the PSModule org (all repos, or scoped to module repos).
  3. Set repository secrets CUSTO_BOT_CLIENT_ID and CUSTO_BOT_PRIVATE_KEY on MSXOrg/Custo.
  4. Set custom properties on each PSModule module repo: Type=Module, SubscribeTo=AGENTS.md. Can be done in bulk via:
    gh api -X PATCH /orgs/PSModule/properties/values \
      --field 'repository_names[]=<repo>' \
      --field 'properties[0][property_name]=Type' \
      --field 'properties[0][value]=Module' \
      --field 'properties[1][property_name]=SubscribeTo' \
      --field 'properties[1][value]=AGENTS.md'
  5. Trigger first run:
    gh workflow run sync-files.yml --repo MSXOrg/Custo

Full runbook in README.

Commits

  • feat: add config/targets.json
  • feat: add Repos/Module/AGENTS.md thin-pointer file set
  • feat: add scripts/Sync-Files.ps1 config-driven sync script
  • feat: add .github/workflows/sync-files.yml
  • docs: rewrite README

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Points module repo agents to PSModule/docs and MSXOrg/docs
instead of duplicating process text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adapted from PSModule/Distributor. Reads target orgs from
config/targets.json, preserves discover-resolve-PR behavior,
no implicit deletes, no duplicate PRs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Daily schedule at 06:00 UTC plus manual dispatch.
Uses PSModule/GitHub-Script with CUSTO_BOT_CLIENT_ID/PRIVATE_KEY secrets.

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

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

Copy link
Copy Markdown
Member Author

Closing as duplicate/superseded by #1 so Custo MVP tracking stays on a single canonical PR.

@MariusStorhaug

Copy link
Copy Markdown
Member Author

Closing as duplicate — superseded by #1, which is the canonical MVP draft PR.

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