The Z00Z website repository is organized around a public documentation product. It contains Next.js source, Markdown content, a whitepaper corpus, configuration, developer scripts, planning artifacts, and local automation rules. It does not contain every future protocol runtime surface. That distinction is the main workspace habit to learn: local site behavior is proved by this repo; broader protocol architecture is proved by the corpus.
Use this page as a map before making changes. Most mistakes in this repository come from putting a change in the wrong layer or writing a claim as if a target subsystem were already present locally.
Repository Shape
The current repo uses the standard source locations below:
| Path | Owns | Typical edits |
|---|---|---|
src/app/ |
Next.js App Router routes, layouts, and route handlers | Page route behavior, API route behavior, layout composition |
src/ |
Shared application source | Components, libs, content loaders, search, config helpers |
content/docs/ |
Public documentation pages | Frontmatter, body copy, diagrams, evidence links, docs navigation |
content/whitepapers/ |
Protocol authority corpus | Source claims, terminology, legal/privacy/PQ boundaries |
config/ |
Project-level configuration | Domain, content-pipeline, site, theme, and related config |
public/ |
Runtime-served static assets | Images, audio, maps, static files |
scripts/ |
Local automation | Verification, sync, pentest, and developer helper scripts |
.planning/ |
GSD phase state | Plans, summaries, review logs, matrices, roadmap, state |
.github/ |
Instruction and automation surfaces | Skills, prompts, hooks, agents, requirements, policies |
reports/ |
Generated machine output | Verification, audit, and tool reports |
There is no top-level app/ source directory. Application routes live under src/app/. Do not place React, TypeScript, hooks, or application logic under public/.
Content-To-Route Model
The docs site is generated from a content tree and an existing loader. A Markdown file under content/docs/ normally maps to a /docs/... route. A section’s _meta.yaml controls ordering and section metadata. Frontmatter controls the page title, description, difficulty, icon, TOC behavior, and other page-level signals.
This model matters because most docs work should not add routes manually. If a page belongs in the docs tree, create or edit the Markdown file, keep _meta.yaml aligned, and let the existing loader resolve it.
Markdown And Rendering Boundary
src/lib/content/markdown.ts is the local authority for Markdown rendering features. It wires the markdown-it pipeline and the installed @mdit/* plugin family, including alerts, containers, tabs, footnotes, snippets, task lists, Mermaid handling, and TOC support. src/lib/content/docs.ts then reads frontmatter with gray-matter, resolves _meta.yaml, derives landing cards, extracts TOC items, rewrites content links, and loads domain pages.
That means a contributor should ask two different questions:
| Question | Where to inspect |
|---|---|
| Can I write this page pattern? | src/lib/content/markdown.ts and config/content-pipeline.yaml |
| Will this page appear in the right route and sidebar? | content/docs/**/_meta.yaml and src/lib/content/docs.ts |
| Is this claim supported by the protocol corpus? | content/whitepapers/ |
| Does the full site still accept the change? | npm run verify |
Do not add a second Markdown renderer, a parallel docs route, or a separate metadata authority for ordinary docs work. Phase 002 specifically reuses the current loader and route architecture.
Configuration And Scripts
The config/ directory holds site and content-pipeline inputs. The scripts/ directory holds executable local automation. The most important first-session scripts are exposed through package.json:
| Script | Backing behavior |
|---|---|
npm run sync:domains |
Synchronizes configured domain entries |
npm run dev |
Starts the default Next.js development server |
npm run dev:turbo |
Starts the Turbopack development server path |
npm run lint |
Runs ESLint |
npm run verify:search |
Runs search coverage verification |
npm run verify |
Runs scripts/verify.sh, which chains lint, search coverage, and build |
If you document a command, it should appear in package.json or an actual script file. If you need a command that does not exist, that is implementation work, not documentation wording.
Planning And Instruction Surfaces
.planning/ contains phase plans, state, roadmap, summaries, and review logs. Treat it as execution evidence. Do not delete or rewrite planning artifacts casually. For GSD work, the plan file defines the scope and verification gates for the current lane.
.github/ contains the local automation and instruction layer:
| Surface | Use |
|---|---|
.github/copilot-instructions.md |
Repo-wide operating rules for agents and contributors |
.github/requirements/Z00Z_WEB_DESIGN_FOUNDATION.md |
Canonical web architecture and UI foundation |
.github/skills/ |
Task-specific skills such as GSD execution, review, doublecheck, diagrams, and versioning |
.github/prompts/ |
Prompt-level review gates and repeatable audits |
.github/agents/ |
Custom agent definitions where the workflow calls for them |
These files are local evidence for workflow claims. They are not a reason to publish private prompt internals. Public docs should describe the supported workflow at the right level: which surfaces exist, what they are for, and how they protect the repository from drift.
Where Not To Put Things
The fastest workspace mistakes are placement mistakes:
| Do not put… | Put it here instead |
|---|---|
React components, hooks, or TypeScript app logic under public/ |
src/components/, src/lib/, or route-local source under src/app/ |
App CSS under public/assets/styles/ |
src/app/globals.css or source-owned component styling |
Public docs body prose in content/**/index.md |
Non-index pages such as get-started.md, workspace.md, or section-specific guides |
| Generated reports as source dependencies | reports/ for output, source/config under the appropriate source directory |
| Protocol implementation claims in docs without local code | Corpus-backed target architecture wording, with evidence links |
| New docs route systems | Existing src/app/docs/[[...slug]]/page.tsx and content loader |
This boundary keeps the repository understandable. It also prevents concept drift where the docs start describing a second product structure that the codebase does not have.
Local Versus Target Architecture
The workspace has three evidence levels:
- Live local repo evidence: Files and commands that exist here, such as
package.json,scripts/verify.sh,src/lib/content/docs.ts,src/lib/content/markdown.ts, andsrc/app/api/dev/content-version/route.ts. - Corpus-backed architecture: Protocol concepts defined in
content/whitepapers/, such as wallet-local possession, checkpoint settlement, assets, vouchers, rights, privacy boundaries, and post-quantum migration. - Open or target work: Surfaces the papers describe as future, proposed, optional, or not fully local here.
When writing developer docs, keep those levels visible. For example, this repository can prove the website route and content loader. It can explain the conceptual API families a future protocol implementation must expose. It should not pretend that the website repo ships every core protocol API, wallet SDK, RPC transport, or cryptographic runtime.
Practical Reading Path
If you are new to the workspace, use this path:
- Open
package.jsonandscripts/verify.shto understand local commands. - Open Get Started for the first-session flow.
- Inspect
content/docs/developers/_meta.yamlfor developer route order. - Read
src/lib/content/docs.tsandsrc/lib/content/markdown.tsbefore changing content loading or Markdown behavior. - Read the relevant whitepaper before adding protocol, wallet, privacy, legal, or crypto claims.
- Run
npm run verifybefore closing the work.
This sequence is intentionally boring. It keeps builders aligned with the actual repo instead of forcing them to infer structure from stale page names or prior planning notes.
Read Next
Continue to Core Protocol API for the protocol object vocabulary, or read AI Agent Playbook for automation-specific workflow rules. Use Get Started when you need the command loop again.
Evidence and Further Reading
src/,src/app/,content/,config/,public/,scripts/,.planning/, and.github/are the live repository surfaces summarized on this page..github/copilot-instructions.mddefines source placement, English-only artifacts, safe file operations, and verification expectations..github/requirements/Z00Z_WEB_DESIGN_FOUNDATION.mddefines canonical Next.js, React, Tailwind, asset, route, and UI architecture rules.src/lib/content/docs.tsandsrc/lib/content/markdown.tsdefine the current docs loading and Markdown rendering boundaries.- Main Whitepaper section 12 defines the live-versus-target evidence split used when workspace docs distinguish this website repo from broader protocol architecture.