Skip to content

Add comprehensive Copilot onboarding instructions#70

Merged
tcrypt25519 merged 5 commits into
mainfrom
copilot/add-copilot-instructions-file-again
Feb 16, 2026
Merged

Add comprehensive Copilot onboarding instructions#70
tcrypt25519 merged 5 commits into
mainfrom
copilot/add-copilot-instructions-file-again

Conversation

Copilot AI commented Feb 14, 2026

Copy link
Copy Markdown

Copilot Instructions - Code Example Fixes

  • Correct CI pipeline steps count (15 → 16)
  • Fix misleading division by zero example
  • Update basic block creation API syntax
  • Fix stack function names (remove underscores)
  • Add helper function reference

Changes Made

CI Pipeline Steps (16 not 15):

  • Added missing step 5: "Log LLVM shared libraries" (verification step)
  • Renumbered all subsequent steps accordingly

Division by Zero Examples:

  • Marked build_select pattern as "ALSO WRONG" (was incorrectly labeled "CORRECT")
  • Clarified that select evaluates both arms, causing poison
  • Added explicit note: "CORRECT approach: Use explicit branching (see below)"

Basic Block Creation API:

  • Fixed from: bctx.func.append_basic_block("name")
  • To correct: bctx.env.context().append_basic_block(bctx.func, "name")
  • Matches actual implementation in crates/jet/src/builder/ops.rs

Function Names:

  • Updated __stack_push_int()stack_push_int()
  • Reflects removal of leading underscores from helper functions

Helper Function Reference:

  • Added note about build_zero_guard() helper function
  • Encourages use of existing abstraction for division-by-zero handling

These fixes ensure code examples are accurate and reflect actual implementation patterns in the codebase.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@semanticdiff-com

Copy link
Copy Markdown

Review changes with  SemanticDiff

…rding guide

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Copilot instructions for optimal coding efficiency Add comprehensive Copilot onboarding instructions Feb 14, 2026
Copilot AI requested a review from tcrypt25519 February 14, 2026 09:26

@tcrypt25519 tcrypt25519 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot Overall I really like these changes. There are some things that we need to update, mostly due to changes that were made in the meantime.

Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
- Remove resolved known issues (test segfaults, SDIV overflow, KECCAK256 fixed)
- Update stack helper function names (remove leading underscores)
- Remove references to deleted docs/ext/evm/*.mdx files
- Add evm-spec-lookup skill as EVM spec reference
- Add docs/process/segfault-troubleshooting.md for P0 segfault handling
- Emphasize agents must NOT add #[allow] pragmas without permission
- Link to docs/process/new-opcode.md instead of duplicating content
- Add memory-based stack and jump tables as architecture limitations
- Update last updated date to 2026-02-16

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
Copilot AI requested a review from tcrypt25519 February 16, 2026 00:19
@tcrypt25519
tcrypt25519 marked this pull request as ready for review February 16, 2026 00:22
Copilot AI review requested due to automatic review settings February 16, 2026 00:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive Copilot onboarding instructions to help coding agents understand the Jet EVM JIT compiler repository structure, toolchain requirements, development patterns, and troubleshooting procedures. The documentation replaces incomplete and incorrect prior instructions with 564 lines of detailed guidance covering all 4 workspace crates, the critical LLVM 21 bootstrap requirement, the 16-step CI/CD pipeline, EVM-specific development patterns, and common troubleshooting scenarios.

Changes:

  • Added docs/process/segfault-troubleshooting.md (105 lines) documenting P0 segfault debugging requirements, common root causes (UAF, null pointer dereference, buffer overflow), and mandatory response actions
  • Expanded .github/copilot-instructions.md from 47 to 564 lines with corrected information about CI/CD (documenting existing GitHub Actions workflow), all 4 crates (not just 2), stable Rust toolchain (not unpinned), and comprehensive development patterns

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
docs/process/segfault-troubleshooting.md New troubleshooting guide for P0 segfault issues with debugging steps, common causes, prevention strategies, and mandatory reporting requirements
.github/copilot-instructions.md Comprehensive expansion from 47 to 564 lines documenting repository structure, LLVM 21 bootstrap, CI/CD pipeline, stack operations, division-by-zero handling, memory expansion patterns, opcode implementation checklist, and troubleshooting guides

Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
@tcrypt25519

Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

- Correct CI pipeline steps from 15 to 16 (missing "Log LLVM shared libraries")
- Fix division by zero example: mark select pattern as "ALSO WRONG"
- Update basic block creation API to correct form: bctx.env.context().append_basic_block()
- Fix function names: stack_push_int() without leading underscores
- Add reference to build_zero_guard() helper function
- Clarify that explicit branching is the ONLY correct approach for div-by-zero

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
@tcrypt25519
tcrypt25519 merged commit cd29cd2 into main Feb 16, 2026
tcrypt25519 added a commit that referenced this pull request Feb 16, 2026
* Initial plan

* docs: Update .github/copilot-instructions.md with comprehensive onboarding guide

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>

* docs: Address PR feedback on copilot-instructions.md

- Remove resolved known issues (test segfaults, SDIV overflow, KECCAK256 fixed)
- Update stack helper function names (remove leading underscores)
- Remove references to deleted docs/ext/evm/*.mdx files
- Add evm-spec-lookup skill as EVM spec reference
- Add docs/process/segfault-troubleshooting.md for P0 segfault handling
- Emphasize agents must NOT add #[allow] pragmas without permission
- Link to docs/process/new-opcode.md instead of duplicating content
- Add memory-based stack and jump tables as architecture limitations
- Update last updated date to 2026-02-16

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>

* docs: Fix code examples and CI step count in copilot-instructions.md

- Correct CI pipeline steps from 15 to 16 (missing "Log LLVM shared libraries")
- Fix division by zero example: mark select pattern as "ALSO WRONG"
- Update basic block creation API to correct form: bctx.env.context().append_basic_block()
- Fix function names: stack_push_int() without leading underscores
- Add reference to build_zero_guard() helper function
- Clarify that explicit branching is the ONLY correct approach for div-by-zero

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
Co-authored-by: Tyler Smith <mail@tcry.pt>
@tcrypt25519
tcrypt25519 deleted the copilot/add-copilot-instructions-file-again branch February 16, 2026 20:02
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.

3 participants