chore: add repository-specific copilot instructions#36
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a repository-specific .github/copilot-instructions.md intended to guide GitHub Copilot contributions for the capiscio-node wrapper (thin passthrough to capiscio-core), including architecture, workflow rules, and publishing guidance.
Changes:
- Introduces Copilot contribution “absolute rules” (PR-only, local validation, avoid blocking commands).
- Documents the wrapper architecture (BinaryManager download/caching +
execapassthrough). - Adds guidance for version alignment and npm publishing triggers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/copilot-instructions.md
Outdated
| - Version must stay aligned with capiscio-core | ||
|
|
There was a problem hiding this comment.
“Version must stay aligned with capiscio-core” appears to conflict with the current code defaults (wrapper is 2.4.0 in package.json, while the default core binary version is hardcoded separately in BinaryManager). Please clarify what “aligned” means here (same semver? compatible range?) and/or point to the single source of truth for the core version.
.github/copilot-instructions.md
Outdated
| npm publish is triggered by creating a GitHub Release (NOT just a tag push). | ||
| ```bash | ||
| git tag v2.4.1 && git push origin v2.4.1 | ||
| gh release create v2.4.1 --title "v2.4.1" # THIS triggers npm publish |
There was a problem hiding this comment.
Publishing guidance says creating a GitHub Release triggers npm publish, but the workflow triggers on release: types: [published] (draft releases won’t publish). Consider explicitly stating that the release must be published (not draft/prerelease) for the automation to run.
| npm publish is triggered by creating a GitHub Release (NOT just a tag push). | |
| ```bash | |
| git tag v2.4.1 && git push origin v2.4.1 | |
| gh release create v2.4.1 --title "v2.4.1" # THIS triggers npm publish | |
| npm publish is triggered by creating a **published** GitHub Release (NOT just a tag push). Draft or prerelease releases will **not** trigger npm publish. | |
| ```bash | |
| git tag v2.4.1 && git push origin v2.4.1 | |
| gh release create v2.4.1 --title "v2.4.1" # Creates a PUBLISHED release, which triggers npm publish |
| ### 2. LOCAL CI VALIDATION BEFORE PUSH | ||
| - Run: `pnpm test` and `pnpm build` | ||
|
|
There was a problem hiding this comment.
The repo’s CI/release workflows and package-lock.json indicate npm is the canonical package manager (npm ci, npm test, etc.), but this doc instructs pnpm for local validation and quick commands. Please align these instructions with the package manager this repo expects (or add/standardize on pnpm with a pnpm-lock.yaml/packageManager field and update workflows/docs accordingly) to avoid contributors running the wrong commands.
.github/copilot-instructions.md
Outdated
| ### 3. NO WATCH/BLOCKING COMMANDS | ||
| - **NEVER run blocking commands** without timeout |
There was a problem hiding this comment.
This section forbids watch/blocking commands, but later the Quick Commands include pnpm dev which runs tsup --watch and is intentionally blocking. Consider clarifying that watch commands are OK for interactive local dev, but should not be run by automation/without a timeout.
.github/copilot-instructions.md
Outdated
| **Before starting work, read the workspace context files:** | ||
| 1. `../../.context/CURRENT_SPRINT.md` - Sprint goals and priorities | ||
| 2. `../../.context/ACTIVE_TASKS.md` - Active tasks | ||
|
|
There was a problem hiding this comment.
These referenced context files are outside this repository (../../.context/...) and won’t exist for most contributors or in typical GitHub checkouts. To prevent confusion, either remove this section or qualify it (e.g., “if working inside the monorepo workspace that includes .context/”).
| **Before starting work, read the workspace context files:** | |
| 1. `../../.context/CURRENT_SPRINT.md` - Sprint goals and priorities | |
| 2. `../../.context/ACTIVE_TASKS.md` - Active tasks | |
| **If you are working inside the monorepo workspace that includes `.context/`, read these workspace context files before starting work:** | |
| 1. `../../.context/CURRENT_SPRINT.md` - Sprint goals and priorities | |
| 2. `../../.context/ACTIVE_TASKS.md` - Active tasks | |
| If these files are not present in your checkout of this repository, you can skip this step. |
.github/copilot-instructions.md
Outdated
|
|
||
| 1. User runs `capiscio verify agent-card.json` | ||
| 2. `cli.ts` invokes `BinaryManager` to ensure Go binary is downloaded | ||
| 3. Binary is cached in OS-specific cache dir |
There was a problem hiding this comment.
The “cached in OS-specific cache dir” description is inconsistent with the current implementation: BinaryManager installs to <packageRoot>/bin (or falls back to ~/.capiscio/bin). Please update this wording to match the actual install/cache locations so troubleshooting is accurate.
| 3. Binary is cached in OS-specific cache dir | |
| 3. Binary is installed to `<packageRoot>/bin` (or falls back to `~/.capiscio/bin`) and reused across runs |
.github/copilot-instructions.md
Outdated
|
|
||
| - **Never add CLI logic here** — all commands belong in capiscio-core | ||
| - Binary downloads use GitHub Releases from `capiscio/capiscio-core` | ||
| - Platform detection: `process.platform` + `process.arch` |
There was a problem hiding this comment.
Platform detection is documented as process.platform + process.arch, but the current code uses os.platform() and os.arch() (then maps to darwin/linux/windows and amd64/arm64). Please align this instruction with the actual implementation to avoid misleading future edits.
| - Platform detection: `process.platform` + `process.arch` | |
| - Platform detection: use `os.platform()` + `os.arch()`, then map to `darwin/linux/windows` and `amd64/arm64` |
- Replace pnpm with npm (repo uses package-lock.json, not pnpm-lock.yaml) - Clarify watch commands OK for interactive dev, not automation - Add conditional check for workspace context files (may not exist) - Clarify version alignment: CORE_VERSION tracks core binary, npm version can differ - Fix publish guidance: release must be published (not draft/prerelease) - Fix cache dir: installed to <packageRoot>/bin or ~/.capiscio/bin - Fix platform detection: os.platform()/os.arch(), not process.platform/arch - Fix CLI command: validate, not verify
Adds
.github/copilot-instructions.mdwith repository-specific guidance for GitHub Copilot: