Add shared port registry workflow and improve scaffold tooling

This commit is contained in:
2026-05-19 21:22:34 -04:00
parent 107f8a2691
commit 3b668c9ced
33 changed files with 2235 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
---
name: "Shared Port Registry Workflow"
description: "Use when working in projects that share development ports. Keep declared ports in project-local JSON and synchronize to the machine-wide source-of-truth registry."
applyTo: "**"
---
- Track each project's declared ports in `.local/project-ports.json` with an array field named `ports`.
- Use entries shaped like `{ "service": "web", "port": 3000, "protocol": "tcp" }`.
- Treat `.local/project-ports.json` as the writable project-local declaration source.
- Synchronize declarations to the machine-wide source-of-truth file at `~/.copilot-resources-state/project-ports-registry.json` using `node ~/.copilot-resources/resources/scripts/update-port-registry.mjs`.
- When a conflict is reported for a port, recommend changing the conflicting unlogged or newly introduced project first.
- Do not change an existing logged incumbent project's port unless the user explicitly asks.
- After changing ports in the new project, re-sync so both JSON files become consistent.
- Use `node ~/.copilot-resources/resources/scripts/update-port-registry.mjs --report` to inspect current conflicts and recommendations.