Z00Z logo

Z00ZBlockchain

AI Agent Playbook

Local operating rules for AI-assisted work in the Z00Z docs repository, including repo instructions, skills, review loops, and claim hygiene.

AI-assisted work is safe in this repository only when the assistant acts like a careful contributor. The repo contains a public docs tree, a whitepaper corpus, Next.js source, workflow scripts, planning artifacts, and local instruction surfaces under .github/. An assistant that writes confident but unsupported prose can damage the docs even when the site still builds.

The operating rule is therefore evidence first: local files prove local workflow claims; whitepapers prove protocol claims; public-language boundaries prove what not to say. Anything outside those sources should stay out of shipped docs unless a plan explicitly adds the missing artifact.

Instruction Priority

Before editing, an agent should resolve the instruction stack from concrete files, not memory. The normal reading order is:

Surface What it controls
Repository instructions Global rules for this workspace, file placement, safety, and output discipline
.github/copilot-instructions.md Local English-only artifacts, safe file operations, web stack boundaries, and verification habits
.github/requirements/Z00Z_WEB_DESIGN_FOUNDATION.md Canonical Next.js, React, Tailwind, asset, route, and UI architecture rules
.github/skills/ Task-specific procedures for planning, execution, review, diagrams, versioning, and audits
.github/prompts/ Reusable review gates such as GSD execution review
.planning/ Phase-specific plans, summaries, matrices, review logs, and state
Target files The source content or code that will actually change

This order matters because a task plan may narrow the edit surface. A global rule might allow a broad refactor, while a GSD plan may require a content-only rewrite, exact frontmatter, repeated review passes, or a frontmatter-only index.md file.

Agent Work Loop

The safest AI loop is short, repetitive, and skeptical:

flowchart TD Intake["Read request and local instructions"] --> Scope["Identify target files and plan scope"] Scope --> Evidence["Collect repo and corpus evidence"] Evidence --> Edit["Edit only the scoped files"] Edit --> Verify["Run local checks"] Verify --> Review["Run review or doublecheck gate"] Review --> Fix{"Issues found?"} Fix -- Yes --> Evidence Fix -- No --> Summary["Write concise status and next step"] style Intake fill:#E3F2FD,stroke:#1E88E5,stroke-width:1px,color:#0D47A1 style Evidence fill:#F3E5F5,stroke:#8E24AA,stroke-width:1px,color:#4A148C style Edit fill:#FFF3E0,stroke:#FB8C00,stroke-width:1px,color:#E65100 style Review fill:#E8F5E9,stroke:#43A047,stroke-width:1px,color:#1B5E20 style Fix fill:#FFE0E0,stroke:#D32F2F,stroke-width:1px,color:#B71C1C

The loop should not end at the first clean build. A build can pass while a page still overclaims privacy, invents a command, uses stale route names, or treats target architecture as shipped implementation. The review step exists to catch those semantic failures.

For larger changes, the loop should produce durable evidence: a summary file, review-log entry, or scoped verification note that another contributor can inspect later. That artifact should name the files changed, the checks run, and the remaining warnings. It should not ask future readers to trust that an invisible assistant “already checked everything.”

Safe File Operations

The local rulebook is strict about destructive actions. Agents should not remove directories, reset worktrees, or overwrite broad file sets casually. For full rewrites of text-like files, create a sibling .bak before replacing content. For normal line edits, use small patches. In a dirty worktree, assume unrelated modifications may belong to the user and do not revert them unless explicitly asked.

The practical pattern is:

  1. Inspect git status --short.
  2. Read the file before editing.
  3. Back up full rewrites when local rules require it.
  4. Apply scoped patches.
  5. Run the relevant verification commands.
  6. Summarize changed files and residual risks.

This is not bureaucracy. It prevents a content rewrite from silently destroying planning evidence, user edits, or source material that another phase still needs.

English Artifacts, Local Chat

Repository artifacts must be written in English: docs pages, comments, code, planning files, commit messages, and generated technical notes. The chat can use another language for user communication, but shipped files should not mix languages. This keeps public docs, search, review, and future diffs consistent.

For AI agents, the rule has a second benefit. It reduces the chance that a plan written in one language becomes public documentation in another, or that a summary can no longer be reviewed by the rest of the repository tooling.

Claim Hygiene

The strongest AI failure mode in this repo is polished concept drift. The model may write a page that sounds like product documentation for a shipped wallet SDK, payment API, or cryptographic backend even when the current website repo only contains content, rendering, and verification code. The fix is not to make the prose vague. The fix is to label the evidence tier.

Use this claim table:

Claim type Required evidence
Local command, route, loader, renderer, or script package.json, scripts/, src/, config/, or the target content tree
Protocol object, settlement, wallet-local possession, receiver flow, or checkpoint rule Main Whitepaper and the matching authority paper
Privacy, disclosure, transport, or telemetry claim Privacy-Threat-Model.md and any relevant protocol page
Post-quantum migration claim Post-Quantum-Migration.md, with the current non-claim preserved
Legal, public-language, issuer, or market-boundary claim Legal-Architecture.md section 17 and the legal docs family
Terminology dispute Corpus-Terminology-Reference.md sections 3, 8, and 9

If a claim cannot be placed in one of those evidence lanes, it should be removed or rewritten as an open question.

Skills And Review Gates

The .github/skills/ directory is part of the local operating surface. Agents should use the matching skill when a task names it or clearly fits it. For docs execution, the common supporting skills are planning/execution skills, review skills, diagram skills, doublecheck, and versioning when commits are requested.

Mermaid diagrams should use existing Mermaid support instead of image assets. Use diagrams when they clarify authority, lifecycle, object flow, or responsibility. Do not add decorative diagrams just to make a page look fuller.

For GSD-driven work, the review loop is mandatory when the plan says so. A typical phase plan requires /.github/prompts/gsd-review-tasks-execution.prompt.md to run at least three times in YOLO mode, fixes between passes, and at least two consecutive clean runs before stopping. That review loop should be recorded in the phase review log, not merely remembered.

doublecheck is useful when the question is whether the final evidence really supports the claims. It should be workspace-first: inspect local files, classify claims, and call out anything unsupported or disputed.

What Not To Expose In Public Docs

This page is itself public documentation, so it should not turn private execution internals into a user-facing manual. It can name public repository surfaces, explain safe workflow, and point to .github/ as the local instruction tree. It should not reveal hidden prompts, private credentials, unreleased operational details, or speculative internal process that a reader cannot verify in the repository.

The same rule applies to assistant summaries. A good summary says what changed and what verified. It does not expose irrelevant internal chain-of-thought, hidden credentials, or model-specific scaffolding.

Failure Modes To Catch

Failure mode Why it matters Review response
Invented command path Sends builders to a tool that does not exist Check package.json and scripts before documenting it
Parallel workflow story Creates a second unofficial process beside the current repo Reuse current scripts, plans, and .github surfaces
Overbroad privacy language Conflicts with legal and privacy papers Replace with scoped privacy and optional disclosure language
Target architecture in present tense Makes conceptual protocol work look shipped Label as target, corpus-backed, or future work
Stale icon or frontmatter metadata Breaks Phase 002 page contract Match the TODO frontmatter exactly
Body content in index.md Violates the current section-home rule Keep index.md frontmatter-only

An agent should treat these as correctness bugs, not style preferences.

Read Workspace for repo structure, then Get Started for local commands. When reviewing protocol-facing pages, open Core Protocol API and Public Claim Boundaries.

Evidence and Further Reading

  • .github/copilot-instructions.md defines the local artifact-language, safe file-operation, source-placement, and verification expectations summarized here.
  • .github/skills/ contains the task-specific local procedures used for planning, execution, review, diagrams, and doublecheck flows.
  • Legal Architecture Whitepaper section 17 defines public-language red lines and safe narrative formulas.
  • Corpus Terminology And Abbreviations Reference section 9 defines editorial guardrails for avoiding concept drift.