Add comprehensive Copilot onboarding instructions#70
Conversation
…rding guide Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
tcrypt25519
left a comment
There was a problem hiding this comment.
@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.
- 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>
There was a problem hiding this comment.
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.mdfrom 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 |
|
@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>
* 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>
Copilot Instructions - Code Example Fixes
Changes Made
CI Pipeline Steps (16 not 15):
Division by Zero Examples:
build_selectpattern as "ALSO WRONG" (was incorrectly labeled "CORRECT")Basic Block Creation API:
bctx.func.append_basic_block("name")bctx.env.context().append_basic_block(bctx.func, "name")Function Names:
__stack_push_int()→stack_push_int()Helper Function Reference:
build_zero_guard()helper functionThese 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.