Page map

From pageel/para-workspace · View interactive version

Page map is an AI agent skill from the GitHub repository pageel/para-workspace. AI Agent skill to read, manage, and manipulate website visual structure using PAGE_MAP.md and BLUEPRINT.md — supports Dual-Wireframes (Desktop/Mobile), Responsive Component Contracts, and Chrome DevTools MCP visual inspection matrix. MANDATORY: Trigger when creating, editing, refactoring, or auditin

How to use this skill

Skill file

Skill: page-map

Version: 2.1.0 | Scope: Global (All Web Projects)

[!WARNING]

Dogfooding Status: This skill is undergoing live testing (dogfooding) at Projects/pageel-website/repo/.pageel/page-maps/. The .pageel/ directory in that repository currently contains test data for this skill. Before pushing to production, review and complete the page-map files in the repo to ensure:

1. The map content matches the actual code precisely (no outdated info).

2. The pages/ and components/ directory structures strictly comply with the v2.1.0 spec of this skill.

3. The repository does not contain redundant testing artifacts — keep only finalized maps.

Intent

Use this skill when attempting to modify page layout, analyze frontend structure, or create new views/components. This skill anchors the AI Agent's structural understanding before analyzing complex source code (.astro, .tsx, etc.).

Scope: Applies to both full pages (e.g., index.astro, features.astro) and individual components (e.g., Hero.astro, Calculator.tsx). A component-level map captures the internal layout of a single reusable unit; a page-level map captures how those components are assembled into a route.

Instructions

1. Directory Structure

All maps are stored under .pageel/page-maps/ (or .para/page-maps/) at the repository root, organized into two subdirectories:

.pageel/page-maps/
├── INDEX.md            # Master index & progress tracker
├── pages/              # Full route-level pages
│   ├── index/
│   │   ├── PAGE_MAP.md
│   │   └── BLUEPRINT.md
│   └── features/
│       ├── PAGE_MAP.md
│       └── BLUEPRINT.md
└── components/         # Individual reusable components
    ├── Hero/
    │   ├── PAGE_MAP.md
    │   └── BLUEPRINT.md
    ├── FeatureGrid/
    │   ├── PAGE_MAP.md
    │   └── BLUEPRINT.md
    └── Calculator/
        ├── PAGE_MAP.md
        └── BLUEPRINT.md

Rules:

2. Identify Existing Maps

Whenever tasked with analyzing or altering a UI element, search for PAGE_MAP.md and BLUEPRINT.md in this order:

  1. .pageel/page-maps/components/<ComponentName>/ — For component-level work.
  2. .pageel/page-maps/pages/<page-name>/ — For page-level work.
  3. Current or target directory — Fallback for legacy or simple setups.

3. Reading Format

The structural layout relies on bracketed section names like [Section.Subsection].

Naming convention for tags:

4. Dual-Wireframe Standard (v2.1.0)

New in v2.1.0: When layout geometry changes significantly between Mobile and Desktop, provide dual ASCII wireframes in PAGE_MAP.md:

## [Component.Hero] Wireframe

### Desktop View (>= 1024px)
+-------------------------------------------------------------+
| [Hero.Title]                | [Hero.IllustrationCard]      |
| [Hero.Subtitle]             |                              |
| [Hero.CTAButtonGroup]       |                              |
+-------------------------------------------------------------+

### Mobile View (< 640px)
+-----------------------------------+
| [Hero.Title]                      |
| [Hero.IllustrationCard] (Scaled)  |
| [Hero.Subtitle]                   |
| [Hero.CTAButtonGroup] (FullWidth) |
+-----------------------------------+

5. Modifying Code

Search within the target source code for inline tags such as {/* [Section.Subsection] */}. Apply your edits contextually near the tags. DO NOT alter sections outside of the designated tags unless specifically requested.

6. Creating New Maps

When asked to create a new map:

  1. Determine scope: Is this a page or a component?
  2. Create PAGE_MAP.md containing ASCII wireframes that illustrate the layout vision. Use [Section.Subsection] references. For complex components, break down into logical zones (header, body, footer, sidebar, etc.). If the component has significantly different mobile vs desktop layouts, use the Dual-Wireframe Standard (§4).
  3. Create BLUEPRINT.md to map those tags to the intended component files, props, and implementation notes. Include Responsive Contract and Verification columns (§7).
  4. Store files in the correct subdirectory:

7. Cross-Referencing (Page ↔ Component)

Page maps and component maps must be linked bidirectionally so navigation between layers is seamless.

In page-level PAGE_MAP.md:

In page-level BLUEPRINT.md:

```markdown

| Section | Source | Hydration | Responsive Contract | Linter Check | MCP Visual (375px) | Component Map |

| :--- | :--- | :--- | :--- | :--- | :--- | :--- |

| [index.hero] | src/components/Hero.astro | Static | flex-col mobile, grid-cols-2 desktop | ✅ PASS | ✅ PASS | CODE4 |

| [index.navbar] | src/components/Header.astro | client:visible | Hamburger Drawer (<768px) | ✅ PASS | ✅ PASS | CODE3 |

```

Why this matters:

8. Practical Guidelines (Lessons Learned)

9. Site Index (INDEX.md)

Create an INDEX.md file at the root of .pageel/page-maps/ to serve as the overall master map of the entire website. This file tracks the page-mapping progress of each page and component.

Vị trí: .pageel/page-maps/INDEX.md

Cấu trúc bắt buộc:

# Site Map Index

> Last updated: YYYY-MM-DD

## Pages

| Route | Source | Status | Map |
| :--- | :--- | :--- | :--- |
| `/` | `src/pages/index.astro` | ✅ Mapped | [pages/index/](pages/index/PAGE_MAP.md) |
| `/features` | `src/pages/features.astro` | ✅ Mapped | [pages/features/](pages/features/PAGE_MAP.md) |
| `/blog` | `src/pages/blog/index.astro` | ⬜ Pending | — |

Pages: `████████░░░░░░░░░░░░` 3/18 (17%)

## Components

| Component | Source | Used by | Status | Map |
| :--- | :--- | :--- | :--- | :--- |
| Navbar | `Navbar.tsx` | All pages | ✅ Mapped | [components/Navbar/](components/Navbar/PAGE_MAP.md) |
| Hero | `Hero.astro` | index | ✅ Mapped | [components/Hero/](components/Hero/PAGE_MAP.md) |
| SEO | `SEO.astro` | All pages (layout) | ⏭️ Skip | — (utility) |

Components: `██████████████████░░` 9/11 (82%)

Status icons:

Progress bar format:

Shared components (used across multiple pages):

Auto-generation (v2.1.0): Use scripts/gen-pagemap.js to auto-scan repository source and generate/update INDEX.md:

node .agents/skills/page-map/scripts/gen-pagemap.js <repo-dir>

10. Integration with `mobile-responsive` Skill (v2.1.0)

New in v2.1.0: This skill integrates directly with the mobile-responsive skill for end-to-end responsive quality assurance.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.