Skip to content

pageel/pageel-page-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pageel Page Map

Pageel Page Map Skill

An AI Agent Skill that teaches any coding agent to see and navigate webpage layouts β€” not just code trees.

Drop in SKILL.md, map your pages, and watch your AI stop guessing which component to edit.

AI Skill Astro MIT License Version

Standalone AI Agent Skill β€” Works with any AI coding agent (Cursor, Windsurf, Gemini CLI, Claude Code). Part of the Pageel ecosystem.

πŸ‡»πŸ‡³ PhiΓͺn bαΊ£n tiαΊΏng Việt

🌟 The Problem

When humans build or modify a webpage, we see a global visual layout (nav, hero, sidebar, footer). When AI Agents modify a webpage, they see endless trees of .astro, .tsx, or .vue files β€” isolated from the big picture. This often leads to AI altering the wrong component or losing track of the structural hierarchy.

πŸš€ The Solution

The Page Map architecture solves this by providing three anchor files:

  1. PAGE_MAP.md β€” An intuitive ASCII wireframe showing the exact visual layout geometry, identifying sections with tags like [hero.title].
  2. BLUEPRINT.md β€” A mapping table linking those tags directly to the actual source code (src/components/Hero.astro).
  3. INDEX.md β€” A site-wide coverage tracker with progress bars showing which pages and components are mapped.

By supplying this shared "mental map," AI Agents become hyper-accurate in UI localization, and developers can instantly swap themes without breaking content structures.

πŸ—ΊοΈ Example: What a PAGE_MAP Looks Like

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ [header]                                                 β”‚
β”‚  logo ─── nav(docs, blog, contact) ─── actions(gh, lang) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ [hero]                                                   β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚ β”‚ [hero.    β”‚ [hero.content]   β”‚ [hero.visual]    β”‚      β”‚
β”‚ β”‚  sidebar] β”‚                  β”‚                  β”‚      β”‚
β”‚ β”‚           β”‚ Welcome to       β”‚ <HeroImage/>     β”‚      β”‚
β”‚ β”‚ vertical  β”‚ My Project       β”‚                  β”‚      β”‚
β”‚ β”‚ text      β”‚ tagline + CTA    β”‚                  β”‚      β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ [features]                                               β”‚
β”‚  Feature cards grid (3 columns)                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ [footer]                                                 β”‚
β”‚  links ─── social ─── copyright                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Then the BLUEPRINT maps each tag to real code:

Section Tag Component Notes
header [header] src/components/Header.astro Fixed, scroll effect
hero.content [hero.content] src/pages/index.astro (inline) h1 + CTA button
hero.visual [hero.visual] src/components/HeroImage.tsx React, client:load
features [features] src/components/FeatureGrid.astro 3-col grid
footer [footer] src/components/Footer.astro Dark background

πŸ“Š Validated Results

Metric Result
Token savings per page ~87% average
Agent navigation accuracy 3/3 test scenarios passed
Build impact Zero (comments only)

Measured during real-world testing on a production Astro site with 120+ pages.

πŸ“¦ What's Included

File Description
SKILL.md Drop-in AI agent instructions β€” makes any agent understand page map context
docs/spec.md Complete format specification (naming, inline tags, storage convention)
templates/PAGE_MAP.md Page-level wireframe template with cross-reference arrows
templates/BLUEPRINT.md Page-level blueprint template with Hydration + Component Map columns
templates/COMPONENT_MAP.md Component-level wireframe template for internal layout zones
templates/COMPONENT_BLUEPRINT.md Component-level blueprint template
templates/INDEX.md Site-wide coverage tracker template with progress bars
examples/ Real-world mappings: Landing Page, Documentation Site, Blog

πŸš€ Quick Start

1. Install the Skill

Copy SKILL.md into your agent's custom instructions or skills folder:

# For PARA Workspace users
cp SKILL.md /path/to/workspace/.agent/skills/page-map/SKILL.md

# For Cursor / Windsurf / other agents
# Copy SKILL.md content into your agent's custom instructions

2. Create Page Maps

Store page maps in .pageel/page-maps/ at your repository root, organized by type:

your-project/
β”œβ”€β”€ .pageel/
β”‚   └── page-maps/
β”‚       β”œβ”€β”€ INDEX.md            ← Site-wide coverage tracker
β”‚       β”œβ”€β”€ pages/
β”‚       β”‚   β”œβ”€β”€ index/
β”‚       β”‚   β”‚   β”œβ”€β”€ PAGE_MAP.md ← Visual wireframe
β”‚       β”‚   β”‚   └── BLUEPRINT.md← Component mapping
β”‚       β”‚   └── about/
β”‚       β”‚       β”œβ”€β”€ PAGE_MAP.md
β”‚       β”‚       └── BLUEPRINT.md
β”‚       └── components/
β”‚           β”œβ”€β”€ Hero/
β”‚           β”‚   β”œβ”€β”€ PAGE_MAP.md ← Internal layout zones
β”‚           β”‚   └── BLUEPRINT.md
β”‚           └── Navbar/
β”‚               └── ...
β”œβ”€β”€ .pageelrc.json              ← (optional) CMS config
└── src/

3. Add Inline Tags

Mark sections in your source code so the agent can navigate precisely:

{/* [hero.cta] */}
<a href="/docs" class="btn-primary">Get Started</a>

{/* [hero.title] */}
<h1 class="text-6xl font-bold">Welcome</h1>

4. Let the Agent Work

Now when you say "fix the CTA in hero", the agent will:

  1. Read .pageel/page-maps/index/BLUEPRINT.md β†’ find [hero.cta] β†’ locate component file
  2. Grep {/* [hero.cta] */} in source β†’ navigate to exact line
  3. Edit only the tagged section β€” no guesswork

πŸ“ Format Specification

See docs/spec.md for the complete specification covering:

  • Section naming convention: [page.section] for pages, [Component.Section] for components
  • Inline tag format: {/* [Section.Subsection] */}
  • Storage convention: pages/ for routes, components/ for reusable units
  • Cross-referencing rules between page and component maps
  • INDEX.md site-wide coverage tracking with progress bars
  • PAGE_MAP, BLUEPRINT, and INDEX file requirements

🀝 Contributing

Contributions are welcome! Ideas for improvement:

  • ASCII layouts for new framework patterns (Next.js, SvelteKit, Nuxt)
  • Better BLUEPRINT column schemas
  • Integration examples for other AI agents

See CONTRIBUTING.md for guidelines.

πŸ“š Related

  • pageel-theme-kit β€” Full theme management with validator + CLI
  • @pageel/mcp-page-map β€” (Coming soon) MCP server exposing page maps as resources

License

MIT β€” Built with ❀️ by the Pageel team.

About

πŸš€ An AI Agent Skill that teaches any coding agent to see and navigate webpage layouts β€” not just code trees. Drop in SKILL.md, map your pages, and watch your AI stop guessing which component to edit.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors