Add shared port registry workflow and improve scaffold tooling
This commit is contained in:
14
resources/instructions/port-registry.instructions.md
Normal file
14
resources/instructions/port-registry.instructions.md
Normal 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.
|
||||
Reference in New Issue
Block a user