Skip to content

chore: add repository-specific copilot instructions#36

Merged
beonde merged 2 commits intomainfrom
chore/add-copilot-instructions
Feb 27, 2026
Merged

chore: add repository-specific copilot instructions#36
beonde merged 2 commits intomainfrom
chore/add-copilot-instructions

Conversation

@beonde
Copy link
Member

@beonde beonde commented Feb 25, 2026

Adds .github/copilot-instructions.md with repository-specific guidance for GitHub Copilot:

  • Thin passthrough wrapper architecture (BinaryManager + execa)
  • Critical rule: never add CLI logic here — all commands belong in capiscio-core
  • Binary download/caching pattern
  • npm publishing workflow (GitHub Release required, not just tag)

Copilot AI review requested due to automatic review settings February 25, 2026 17:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 + execa passthrough).
  • Adds guidance for version alignment and npm publishing triggers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +73 to +74
- Version must stay aligned with capiscio-core

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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.

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +80
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
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
### 2. LOCAL CI VALIDATION BEFORE PUSH
- Run: `pnpm test` and `pnpm build`

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +12
### 3. NO WATCH/BLOCKING COMMANDS
- **NEVER run blocking commands** without timeout
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +21
**Before starting work, read the workspace context files:**
1. `../../.context/CURRENT_SPRINT.md` - Sprint goals and priorities
2. `../../.context/ACTIVE_TASKS.md` - Active tasks

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/”).

Suggested change
**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.

Copilot uses AI. Check for mistakes.

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
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.

- **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`
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- Platform detection: `process.platform` + `process.arch`
- Platform detection: use `os.platform()` + `os.arch()`, then map to `darwin/linux/windows` and `amd64/arm64`

Copilot uses AI. Check for mistakes.
- 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
@beonde beonde merged commit 2476510 into main Feb 27, 2026
3 checks passed
@beonde beonde deleted the chore/add-copilot-instructions branch February 27, 2026 20:59
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.

2 participants