name: z8-development description: Guidelines and instructions for developing the Z8 runtime. Includes coding standards, build processes, and testing workflows. license: Apache-2.0 metadata: author: Zane V8 Authors version: "1.0.0"
Z8 Development Skill
This skill provides instructions for maintaining and extending the Z8 JavaScript runtime.
Coding Standards
All C++ code in the Z8 project should adhere to the following standards:
- Methods: Use
camelCase(e.g.,readFile,setTimeout). - Member Variables: Prefix with
m_(e.g.,m_count,m_isRunning). - Pointers: Prefix with
p_(e.g.,p_isolate,p_context). - Static Variables: Prefix with
s_(e.g.,s_instance). - Integer Types: Use
int32_tinstead ofint. - Reference Docs: Agent MUST read and follow
docs/CODING_STYLE_en.md,docs/OPTIMIZATION.md, vàdocs/TOOLS_GUIDE_vi.mdto understand the project deeply.
Build Process
The project is built using a PowerShell script:
- Run
.\build.ps1from theZ8-appdirectory. - For a clean build, you may need to remove
.objfiles.
Testing & Validation
After implementing new features or making changes, you MUST re-test to ensure stability and performance.
Before committing changes, ensure the following checks pass:
- Style Check: Run
python tools/check_style.py. - Benchmark: Run
.\z8.exe ..\TEST\benchmark_fs.jsto verify performance consistency. - FS Validation: Run
.\z8.exe ..\TEST\validate_fs.jsfor deeper I/O checks. - Git Hooks: Ensure
python tools/install_hooks.pyhas been run to enable pre-commit checks.
Repository Structure
src/: Core C++ source files.tools/: Development and build support tools.docs/: Documentation and coding style guides.Agent-Skills/: AI agent capability definitions (this directory).