Skip to content

docs: add AGENTS.md and CLAUDE.md for AI coding agents#313

Merged
Inquisitor-201 merged 2 commits into
syswonder:devfrom
Inquisitor-201:docs/agents-md
May 26, 2026
Merged

docs: add AGENTS.md and CLAUDE.md for AI coding agents#313
Inquisitor-201 merged 2 commits into
syswonder:devfrom
Inquisitor-201:docs/agents-md

Conversation

@Inquisitor-201
Copy link
Copy Markdown
Contributor

@Inquisitor-201 Inquisitor-201 commented May 26, 2026

Motivation

AI-assisted coding is becoming mainstream. As hvisor development increasingly relies on coding agents (Claude Code, GitHub Copilot, Codex, etc.), the lack of project-level context means every new session starts from scratch — agents need to rediscover the project structure, build system, and conventions, wasting tokens and rounds of conversation.

This PR introduces AGENTS.md, a cross-agent project guide that lets any compatible coding agent understand hvisor immediately.

Changes

AGENTS.md

Cross-agent project guide (compatible with Claude Code, Copilot, Codex, Cursor, and 20+ other tools), covering:

  • Project overview: Type-1 hypervisor, no_std, 4 architectures, 20+ boards
  • Quick start: make ARCH=aarch64 BOARD=rk3588 LOG=LOG_INFO
  • Source layout: arch/, zone/, hypercall/, device/, pci/, memory/ — what each module does in one line
  • Coding conventions: HvResult error handling, spin locks, unsafe boundaries, formatting checklist
  • Cross-repo workflow: hvisor depends on hvisor-tool. When tasks involve hypercall ABI, IOCTL, VirtIO, or zone config, agents are instructed to ask the user for the local hvisor-tool path before proceeding
  • Commit message format: Conventional Commits + Co-authored-by trailer for AI-assisted work

CLAUDE.md

@import AGENTS.md

A one-liner that reuses AGENTS.md content via Claude Code's @import mechanism, avoiding duplication.

References

Inspired by the vLLM project's AGENTS.md (precise commands, domain boundaries, AI attribution), but adapted for hvisor's smaller team and academic project context.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 26, 2026
AGENTS.md provides project context, build instructions, coding
conventions, cross-repo workflow guidance, and commit standards
for AI-assisted development. CLAUDE.md imports AGENTS.md via
@import directive.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Comment thread AGENTS.md
Comment on lines +43 to +60
## Cross-Repository Work

This repo works with
[hvisor-tool](https://github.com/syswonder/hvisor-tool), which provides:

- Kernel module `driver/hvisor.ko` — zone lifecycle, image loading, VirtIO
communication
- Userspace binary `tools/hvisor` — zone management CLI, VirtIO device
backends

**When the task involves any of the following, ask the user for the local
path to hvisor-tool before proceeding:**

- Hypercall ABI (`hvisor_call` in `include/def.h`, hypercall codes)
- IOCTL interface (`include/hvisor.h`)
- VirtIO protocol (shared-memory request/response in `tools/virtio/`)
- Zone config structs (`include/zone_config.h`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we also include a link to the hvisor-book (https://github.com/syswonder/hvisor-book)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we also include a link to the hvisor-book (https://github.com/syswonder/hvisor-book)?

Yes, I will include this link later.

Copy link
Copy Markdown
Contributor

@agicy agicy left a comment

Choose a reason for hiding this comment

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

This is a great initiative to standardize AI-assisted development and provide precise project context. The guidelines are clear and accurate. Approved.

@Inquisitor-201 Inquisitor-201 merged commit 294d960 into syswonder:dev May 26, 2026
4 checks passed
@Inquisitor-201 Inquisitor-201 deleted the docs/agents-md branch May 26, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants