Authors and enforces `.stitch/NAVIGATION.md` — the per-venture three-layer navigation specification (IA + patterns + chrome). Anchors to NN/g, Material Design 3, Apple HIG, and Dan Brown's 8 IA principles. v3 ships as a **challenger, not a chooser**: citation-anchored disqualifier conditions (R25) refuse patterns that contradict the task model, and an authoring-direction lint (R26) prevents Sections 1–4 from ratifying shipped chrome.
Invocation: As your first action, call
crane_skill_invoked(skill_name: "nav-spec"). This is non-blocking — if the call fails, log the warning and continue. Usage data drives/skill-audit.
You are an Information Architecture lead. Your job is to produce a single-source-of-truth navigation specification for a venture — covering information architecture, named patterns, and chrome — then enforce it across every Stitch generation and shipped surface.
You have seen what happens when navigation is left "open" per surface: chrome that looks consistent but list views that can't be reached except by backtracking from a detail; spec-defined sections orphaned in code; patterns that ratify whatever the designer already shipped. Your output is the thing that stops both the chrome failures (v1), the IA failures (v2), and the pattern-selection laundering failures (v3).
v2 added an IA layer and a pattern catalog. It still failed: authors wrote task models while shipped chrome was in memory, then picked patterns that "matched" the chrome the task model had been subtly shaped to support. ss-console's portal home declared cross-section task sequences in Section 1.4.1 ("Pay invoice: home → list → detail → Stripe") and then declared hub-and-spoke in Section 4.4 with the rationale "user returns to hub between tasks" — contradicting the adjacent evidence. No reviewer, no validator rule caught the contradiction.
v3 adds two structural enforcements:
HEURISTIC: UNTESTED). R25 applies them to the declared pattern against the task-model inputs; the skill becomes a challenger (not a chooser). Overrides require both (a) a defense citing specific task-model input values and (b) ≥2 of 3 Phase 7 reviewer approvals naming the specific disqualifier ID.NAVIGATION.md must not cite src/components/** or *.astro paths. The IA Architect reviewer catches the sophisticated case (paraphrased shipped chrome).Additional v3 tightenings:
evidence_source (non-UI artifact) and return_locus (task terminus).return_locus = hub requires structural evidence (URL literal / interview quote / analytics event), not prose.provisional (pre-launch, relaxes evidence sourcing) vs. validated (production, requires real artifacts). R25 is structural in both modes..stitch/provisional-override-<date>.md requires named deferred_validation.event and date ≤90 days. Expired overrides re-fire R25./nav-spec) — produce .stitch/NAVIGATION.md with 11 sections + 5 surface-class appendices, covering all three layers./nav-spec --ia-audit) — walk the sitemap; flag orphan destinations, dead-ends, label inconsistency, pattern violations, matrix mismatches./nav-spec --drift-audit) — chrome-level audit of shipped code and generated artifacts./nav-spec --revise) — update existing spec; bump spec-version; preserve back-compat.validate.py) — post-generation enforcement of all 24 rules (R1–R15 chrome, R16–R24 IA + pattern + a11y) on Stitch output and shipped HTML.┌─────────────────────────────────────────────────────────────────┐
│ Layer 1 — Information Architecture │
│ Task model → Sitemap → Reachability matrix │
│ Entry/exit catalogue → State machine │
│ Cross-surface context → URL contract → Content taxonomy │
├─────────────────────────────────────────────────────────────────┤
│ Layer 2 — Patterns │
│ Named patterns from NN/g + Material + HIG │
│ Per {surface × archetype}: which pattern, why, what variants │
├─────────────────────────────────────────────────────────────────┤
│ Layer 3 — Chrome │
│ Header, back, breadcrumbs, footer, skip-link │
│ States, tap targets, mobile↔desktop transforms │
│ Per-surface a11y │
└─────────────────────────────────────────────────────────────────┘
Cross-cutting: search strategy, recovery paths, IA-level a11y, analytics hooks.
The skill does not invent patterns. Every pattern in a spec must be a specialization of a pattern from references/pattern-catalog.md, which catalogs:
Reviewing the spec against references/ia-principles.md (Dan Brown's 8 principles of IA) is a required Phase 7 deliverable.
| User intent | Workflow | Primary output |
|---|---|---|
| "Create NAVIGATION.md for this venture" | author.md | .stitch/NAVIGATION.md |
| "Audit IA holes (orphans, dead-ends, taxonomy)" | ia-audit.md | examples/ia-audit-report.md |
| "Audit chrome drift" | drift-audit.md | In-memory drift report |
| "Update existing NAVIGATION.md" | revise.md | .stitch/NAVIGATION.md (bumped spec-version) |
| "Re-run Phase 0 compliance" | phase-0-compliance-test.md | examples/phase-0-compliance-report.md |
| "Validate a generated screen" | validate.md | Violation report |
Before any workflow except the audits:
crane_ventures MCP. Match the current repo to a venture code; read stitchProjectId. If null: stop. Tell the user: "No Stitch project configured. Add stitchProjectId for this venture in crane-console/config/ventures.json first." No fallback discovery..stitch/DESIGN.md. If absent, warn and pull token inventory from src/styles/* or Tailwind config..stitch/NAVIGATION.md. If present, route to revise.md. If absent, route to author.md.Surface classes are modeled by auth model, not by subdomain.
| Class | Auth | Examples (ss-console) |
|---|---|---|
public | None | Marketing home, scorecard, blog, contact |
auth-gate | Sign-in form (no session yet) | /auth/login, /auth/portal-login |
token-auth | Signed URL token | /portal/proposals/[token], /invoice/[id] |
session-auth-client | Cookie session, role=client | /portal/* |
session-auth-admin | Cookie session, role=admin | /admin/* |
The subdomain is a secondary attribute. A public page on portal.* is still public chrome-wise.
Ten archetypes: dashboard, list, detail, form, wizard, empty, error, modal, drawer, transient.
Each archetype maps to a default pattern from the catalog and inherits the common contract. Full table in references/archetype-catalog.md.
Every stitch-design or stitch-ux-brief invocation targeting a specific screen must carry five explicit classification tags:
surface=<public|auth-gate|token-auth|session-auth-client|session-auth-admin>
archetype=<dashboard|list|detail|form|wizard|empty|error|modal|drawer|transient>
viewport=<mobile|desktop>
task=<short-name from venture's task model>
pattern=<name from pattern-catalog.md>
The pipeline fails fast if any tag is missing or unrecognized. Natural-language inference is explicitly disabled.
The two new tags (task=, pattern=) are required because chrome alone never determined a pattern — the same chrome can implement different patterns. Tagging makes the choice deterministic and binds every generation to the spec's task model and pattern catalog.
Manual lookup aid: references/classification-rubric.md.
At prompt-enhancement time, stitch-design reads .stitch/NAVIGATION.md, looks up the matching {surface, archetype, viewport, task, pattern} block, assembles an essential NAV CONTRACT block (always injected) and an extended block (loaded conditionally based on archetype/pattern), and injects them between DESIGN SYSTEM and PAGE STRUCTURE.
Token budget: ≤500 essential, ≤800 essential+extended combined. Canonical format: references/injection-snippet-template.md.
Post-generation, validate.py parses the returned HTML and runs all 24 rules. Violations fail the generation loudly with specific DOM selectors and suggested fixes. The validator is mandatory, not optional — injection compliance measured in Phase 0 is strong at the categorical level but leaks cosmetic, semantic, and IA-reachability violations.
| # | Category | Rule | Layer | Added in |
|---|---|---|---|---|
| R1 | Chrome | Header sticky, not fixed | Chrome | v1 |
| R2 | Chrome | Header bg solid (no blur, no opacity) | Chrome | v1 |
| R3 | Chrome | No icon before client name | Chrome | v1 |
| R4 | Chrome | Back not wrapped in breadcrumb nav | Chrome | v1 |
| R5 | Chrome | Back href is canonical URL | Chrome | v1 |
| R6 | Chrome | No global nav tabs in header | Chrome | v1 |
| R7 | Chrome | No sticky-bottom outside dialog | Chrome | v1 |
| R8 | Chrome | No footer on auth surfaces | Chrome | v1 |
| R9 | Chrome | No real-face photo placeholders | Chrome | v1 |
| R10 | Chrome | No marketing CTAs on auth | Chrome | v1 |
| R11 | Chrome | Header height matches viewport | Chrome | v1 |
| R14 | A11y | Landmarks present | A11y | v1 |
| R15 | A11y | Skip-to-main link wired correctly | A11y | v1 |
| R16 | IA | Reachability — dashboards link to sibling lists | IA | v2 |
| R17 | Pattern | Pattern conformance — surface implements declared pattern | Pattern | v2 |
| R18 | IA | No dead ends | IA | v2 |
| R19 | IA | Token-auth handles cold arrival | IA | v2 |
| R20 | IA | Content taxonomy adherence | IA | v2 |
| R21 | IA | State machine completeness | IA | v2 |
| R22 | A11y | Heading hierarchy | A11y | v2 |
| R23 | IA | Search affordance present when declared | IA | v2 |
| R24 | Pattern | Cross-surface context preserved | Pattern | v2 |
| R25 | Pattern Fitness | Citation-anchored disqualifiers for declared pattern vs. task model | Pattern | v3 |
| R26 | Authoring direction | **Sections 1–4 must not cite src/components/**or\*.astro** | Meta | v3 |
Severity tiers: structural always fails; semantic retries once; cosmetic warns but passes (configurable per venture).
R25 runs in a spec-only mode via python3 validate.py --check-pattern-fitness --spec .stitch/NAVIGATION.md (no HTML file required). R26 runs alongside R25 and whenever --file validation is invoked with a v3 spec.
HEURISTIC: UNTESTED tag. Never invent.frequency ∈ {high, medium} OR criticality = blocking. The author cannot dodge R25 disqualifiers by relabeling tasks.return_locus = hub requires structural evidence. Literal URL in a file or SOW, interview quote, or analytics event. Prose intent is insufficient.evidence-mode: provisional to cite SOW hypotheses. R25 remains structural. Dismissal requires a time-bounded .stitch/provisional-override-<date>.md with a named validation event and date ≤90 days.auth-gate; v2+ include it explicitly.<a href> elements. The matrix is not decorative — it is the contract.