project-structure

Notes describing the folder layout of a VitePress documentation site. VitePress is a tool that turns Markdown files into a documentation website.

In plain words
What is it for?
Use them when adding or locating documentation, chapter code, series sidebars, site settings, edit links, or GitHub Pages deployment files.
Why use it?
They make it easier to find series pages, numbered chapters, code samples, configuration, navigation, and deployment files. They also explain how each documentation series is kept self-contained.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/dalehurley/codewithphp/project-structure
Clone the repo
git clone --depth 1 https://github.com/dalehurley/codewithphp

Made for: Cursor.

Per session 243 This file is loaded in full into every session.
When invoked 243 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00243 $0.00243
Opus 5 $0.00121 $0.00121
Sonnet 5 $0.00049 $0.00049
Haiku 4.5 $0.00024 $0.00024

Measured yesterday against content hash d6abc110e092, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

project-structure scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/project-structure.mdc · 25 lines

What it actually says

Project Structure

  • docs/ — VitePress content root

    • .vitepress/config.ts — site configuration (title, base, nav, sidebar)
    • index.md — landing page and series entry points
    • series/<series-slug>/index.md — series overview (self-contained)
    • series/<series-slug>/chapters/<nn>-<chapter-slug>.md — numbered chapters
    • series/<series-slug>/code/ — chapter code samples colocated with content
  • .cursor/rules/ — Cursor authoring/navigation rules

  • package.json — scripts for dev/build/preview (VitePress 1.6.4)

  • .github/workflows/ — CI for GitHub Pages deploy

Notes

  • Each series is independent: overview, prerequisites, chapters, and code live under its own folder.
  • Sidebars are defined per-series in docs/.vitepress/config.ts using the directory layout above.
  • GitHub edit links point to https://github.com/dalehurley/codewithphp/edit/main/docs/:path.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 25 lines · 243 tokens per session scan A d6abc110e092

Subscribe to this mod's changes

project-structure is a cursor rule published in the GitHub repository dalehurley/codewithphp (5 stars, last pushed 6mo ago), licensed MIT. It adds 243 tokens to every session, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.