You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/AGENTS.md

47 lines
2.9 KiB
Markdown

# Virt Cloud development rules
- This repository is the independent Virt Cloud project. Work only inside this
checkout unless the user explicitly authorizes changes to another project.
- When a task depends on historical decisions, test results, or project
context, and the knowledge vault is available, first read
`/Users/admin/Documents/www/codex-knowledge/AGENTS.md`, then
`Memory/INDEX.md` and `Memory/CURRENT.md`; follow only the linked notes
relevant to the task. If the vault is unavailable, say so explicitly and do
not guess the old project state.
- The Git remote is `https://g.luoli.live/root/virt.git`.
- All subsequent changes, commits and pushes for this project must use the
independent `go` branch. Do not commit or push them to `main`, `dev`, or
`venix`, and never force-push.
- Before editing or committing, check the current branch and working tree.
Preserve unrelated user changes. If this checkout is not on `go`, stop
before changing files and resolve the branch safely.
- Never commit real configuration, credentials, private keys, database dumps,
installed dependencies, runtime logs or caches. Keep source configuration
examples and source schema files versioned.
- The PHP application lives in `web/`; its eventual HTTP document root is
`web/public/`, not the repository root.
- Only the venix theme is retained. Ordinary users must not receive host
administration or retired node-management routes.
- PHP owns accounts, wallet purchases, orders, public-key ownership, public
HTTP authorization, the agent registry and operation coordination. A Go
agent on each virtualization host owns libvirt and local VM operations.
Authenticate every panel-to-agent request; do not retain a Python engine or
compatibility path for the retired engine/database.
- Purchases provision one VM from the plan snapshot. Each purchase or renewal
creates an independent prepaid service period and traffic entitlement.
A finite entitlement may be shared only inside its frozen user and commercial
line group; allocation is strict FEFO, period expiry forfeits only that
entitlement's unused bytes, and unlimited periods never join a finite pool.
Exhausting an enforced shared pool disconnects every active finite instance
in that user/group until usable balance returns. Legacy unpooled periods keep
their per-instance quota semantics. Final expiry disconnects networking
without powering off the VM. An unpaid
renewal invoice enters a three-day grace period and then permanently removes
the VM definition and its panel-managed disks. Never replay an ambiguous
destructive operation or refund it without confirmed cleanup; reconcile its
operation identifier.
- Users share the original VM-panel styling; administrator pages retain venix.
- See `docs/PRUNING_REPORT.md` for retained/removed feature boundaries. Keep
architecture and deployment documentation aligned with the PHP/Go-agent
implementation and its clean-break database schema.