skills: document dense-map escape hatches (standard quality + larger viewBox) for Archify

- project-diagramming-archify (v1.1.0): new 'Dense maps' section — drop to --quality standard (4 checks vs 9), enlarge meta.viewBox (no schema max, examples up to 1080x780), or split maps, before simplifying node set; visual-check must fit 1440x900 without scrolling
- archify vendored SKILL.md: add dense-map off-ramp note near fast-authoring step 3
- fixes AI agents hitting showcase composition walls on rich maps + vertical-overflow confusion
This commit is contained in:
2026-09-06 18:15:22 +10:00
parent 8b12596cac
commit 840fc36116
2 changed files with 22 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ Use this bounded path for ordinary generation. Do not read the optional Viewer R
1. Choose `architecture`, `workflow`, `sequence`, `dataflow`, or `lifecycle` from the question. 1. Choose `architecture`, `workflow`, `sequence`, `dataflow`, or `lifecycle` from the question.
2. Read one matching schema in `schemas/`, `schemas/common.schema.json`, and one matching JSON example in `examples/`. Read only those files. Fresh authorship means new stable IDs, domain wording, and layout; use the example for field shape, not facts. 2. Read one matching schema in `schemas/`, `schemas/common.schema.json`, and one matching JSON example in `examples/`. Read only those files. Fresh authorship means new stable IDs, domain wording, and layout; use the example for field shape, not facts.
3. Artifact first: the next tool action must write the candidate. Write the candidate before inspecting renderer internals. Do not plan exact coordinates in prose. Start with one clear main path, short side branches, sparse labels, and at most 12 primary nodes. Set `meta.quality_profile` to `"showcase"` unless the user explicitly requests a dense `standard` map. Start with automatic routes and labels. Do not add `via`, `channelX`, `channelY`, or `labelAt` before a diagnostic calls for one; apply at most one diagnosed geometry control per repair. 3. Artifact first: the next tool action must write the candidate. Write the candidate before inspecting renderer internals. Do not plan exact coordinates in prose. Start with one clear main path, short side branches, sparse labels, and at most 12 primary nodes. Set `meta.quality_profile` to `"showcase"` unless the user explicitly requests a dense `standard` map. Start with automatic routes and labels. Do not add `via`, `channelX`, `channelY`, or `labelAt` before a diagnostic calls for one; apply at most one diagnosed geometry control per repair.
**Dense maps (the designed off-ramp, not a failure):** if a legitimately rich topology keeps failing showcase composition or will not fit a ~900px-tall viewport, switch the whole run to `standard` quality (`--quality standard` on BOTH `validate` and `deliver` — 4 artifact checks instead of 9, far fewer composition constraints) and enlarge `meta.viewBox` (schema has no maximum; examples ship up to 1080×780). Do not fight showcase for many rounds; do not fake a visual-check pass for vertical overflow — report it truthfully. Only simplify the node set as a last resort, and say so.
4. Validate after every candidate edit and immediately before handoff: 4. Validate after every candidate edit and immediately before handoff:
```bash ```bash

View File

@@ -1,7 +1,7 @@
--- ---
name: project-diagramming-archify name: project-diagramming-archify
description: Create or update an interactive Archify architecture map for a project. Accept plain-language requirements or pasted Mermaid (flowchart/sequence/stateDiagram) and compile typed JSON IR into a self-contained interactive HTML diagram (architecture, workflow, sequence, dataflow, lifecycle) under the project's docs/ directory. Use when the user asks for architecture/flow/data visualization, or the diagrams were just created/updated with project-diagramming-mermaid. Per-project only — never global. description: Create or update an interactive Archify architecture map for a project. Accept plain-language requirements or pasted Mermaid (flowchart/sequence/stateDiagram) and compile typed JSON IR into a self-contained interactive HTML diagram (architecture, workflow, sequence, dataflow, lifecycle) under the project's docs/ directory. Use when the user asks for architecture/flow/data visualization, or the diagrams were just created/updated with project-diagramming-mermaid. Per-project only — never global.
version: 1.0.0 version: 1.1.0
--- ---
# project-diagramming-archify # project-diagramming-archify
@@ -25,6 +25,7 @@ node ~/.agents/skills/archify/bin/archify.mjs <command> ...
Commands (from the vendored skill's fast authoring path): Commands (from the vendored skill's fast authoring path):
- `guide "<scenario>" --json` — when unsure which diagram type fits the ask. - `guide "<scenario>" --json` — when unsure which diagram type fits the ask.
- `validate <type> <candidate.json> --quality showcase --json` — iterate during authoring; **showcase pass = 9 artifact checks, 0 composition errors, 0 warnings**. - `validate <type> <candidate.json> --quality showcase --json` — iterate during authoring; **showcase pass = 9 artifact checks, 0 composition errors, 0 warnings**.
- `validate <type> <candidate.json> --quality standard --json` — **dense-map tier**: 4 artifact checks, far fewer composition constraints. Use for rich/large topologies (see "Dense maps" below). Pass the same `--quality` to `deliver`.
- `deliver <type> <candidate.json> <output.html> --quality showcase --json` — final acceptance (freezes spec bytes, atomically commits HTML, reports SHA-256 + byte counts). - `deliver <type> <candidate.json> <output.html> --quality showcase --json` — final acceptance (freezes spec bytes, atomically commits HTML, reports SHA-256 + byte counts).
- `visual-check <output.html> --json` — best-effort screenshot/containment evidence; needs Chrome/Chromium, exit 2 = skipped gracefully (e.g. .13 has no chrome). Never claim visual inspection you did not perform. - `visual-check <output.html> --json` — best-effort screenshot/containment evidence; needs Chrome/Chromium, exit 2 = skipped gracefully (e.g. .13 has no chrome). Never claim visual inspection you did not perform.
@@ -36,9 +37,25 @@ Commands (from the vendored skill's fast authoring path):
- `flowchart` / `graph` → `workflow`, or `architecture` for a component map. - `flowchart` / `graph` → `workflow`, or `architecture` for a component map.
- `sequenceDiagram` → `sequence` (participants → semantic participants, arrows → messages). - `sequenceDiagram` → `sequence` (participants → semantic participants, arrows → messages).
- `stateDiagram` → `lifecycle` (states & transitions keep meaning). - `stateDiagram` → `lifecycle` (states & transitions keep meaning).
4. **Validate-iterate**: `validate` after every candidate edit and immediately before handoff. Fix only diagnosed issues; if two consecutive rounds don't improve the error count, stop and report truthfully. 4. **Validate-iterate**: `validate` after every candidate edit and immediately before handoff. Fix only diagnosed issues; if ~2–3 consecutive rounds don't improve the error count, stop iterating and use the **dense-map escape** below (standard profile / bigger viewBox / split) instead of forcing a simplified node set.
5. **Deliver**: `deliver <type> <candidate.json> <output.html> --quality showcase --json`. Non-zero exit is never success. 5. **Deliver**: `deliver <type> <candidate.json> <output.html> --quality showcase --json`. Non-zero exit is never success.
## Dense maps — the sanctioned escape hatches (read before simplifying)
Archify is a **curation** tool, not an everything-map. Two hard gates can make a rich topology fight you:
- **showcase composition** — 9 checks: ≥8px segments, no edge-through-node, no ambiguous corridors, no label collisions.
- **visual-check viewport fit** — the whole map must fit **1440×900 without scrolling** (`scrollWidth ≤ innerWidth && scrollHeight ≤ innerHeight` at every checked size). A 4-lane, 6-column flow physically cannot fit 900px tall → vertical overflow is expected for such maps.
When ~2–3 rounds don't improve, do **NOT** silently simplify to fewer nodes. Work through these in order, and tell the user what you did:
1. **Drop to `standard` quality** (recommended for dense maps) — pass `--quality standard` to BOTH `validate` and `deliver` (4 artifact checks instead of 9; the §composition constraints that blocked you are mostly gone). A user who asks for a rich/dense map IS asking for standard — the skill's default is showcase *unless the user explicitly requests a dense standard map*.
2. **Enlarge `meta.viewBox`** — schema min is 320×240, **no max** (examples ship up to 1080×780). More Y room fixes squeezed lanes. Caveat: to still *pass* visual-check, keep total height ≤ ~900px; anything taller may overflow (report it truthfully — never fake a pass with `overflow: hidden`).
3. **Split into multiple maps** — main flow in one map; detail (rejected paths, secondary stores) in a second map or as `cards` / Obsidian / Outline content. One obvious main path is the design philosophy; low-value edges belong in cards, not the canvas.
4. **Only then** simplify the node set — and say so explicitly ("kept the N-node validated map; detail lives in X").
> Design envelope: shipped examples run **10–12 primary components**, viewBox 720×900 → 1080×780. Above ~12 primary nodes → split-map territory, not an everything-map.
## Output locations (per-project, always under the project's docs/) ## Output locations (per-project, always under the project's docs/)
- **JSON IR source (single source of truth):** `<project>/docs/archify/<topic>.<type>.json` - **JSON IR source (single source of truth):** `<project>/docs/archify/<topic>.<type>.json`
@@ -65,6 +82,7 @@ After a successful `deliver`, offer to **publish** the project's `docs/` to the
## Authoring rules (subset of the vendored skill — read SKILL.md for full invariants) ## Authoring rules (subset of the vendored skill — read SKILL.md for full invariants)
- Omit `meta.visual_preset`, `meta.subtitle`, `meta.legend`, `meta.engineering_profile` by default. - Omit `meta.visual_preset`, `meta.subtitle`, `meta.legend`, `meta.engineering_profile` by default.
- Omit `meta.viewBox` by default (schema min 320×240, no max); **enlarge it for dense maps** so lanes/labels fit cleanly without shrinking nodes.
- Match authored strings to the user's language; preserve exact product names / commands / API paths / env names. - Match authored strings to the user's language; preserve exact product names / commands / API paths / env names.
- Automatic routes own their endpoint sides; never accept an edge crossing an unrelated opaque node. - Automatic routes own their endpoint sides; never accept an edge crossing an unrelated opaque node.
- Sequence: omit `meta.column_fit` (fixed); use `"spread"` when participants don't fit. - Sequence: omit `meta.column_fit` (fixed); use `"spread"` when participants don't fit.