Canvas bootstrap

From hua-bang/pulse-agent · View interactive version

Canvas bootstrap is an AI agent skill from the GitHub repository hua-bang/pulse-agent. Deep-research a topic and build a structured Pulse Canvas workspace with approved research depth, source-backed findings, progressive or final canvas creation, spatially organized frames, content nodes, and connections. Use when the user asks to bootstrap, generate, research, organize, or build an A

How to use this skill

Skill file

Canvas Bootstrap

Turn a topic into a source-backed Pulse Canvas workspace. This skill is an orchestrator: use a user-approved research skill or the bundled canvas-deep-research protocol for evidence gathering, then use pulse-canvas layout commands for geometry.

This version is for agents that reach the canvas through the pulse-canvas CLI. The Canvas Agent inside Pulse Canvas has its own native-tool version of this skill.

Core Contract

Phase 0: Depth Gate

If the user did not explicitly choose a depth, ask a short question and stop. Translate this example into the user's language:

请选择这次调研深度:
1. Quick - 快速扫一遍,适合方向判断
2. Standard - 标准调研,适合生成一张可靠画布
3. Deep - 深度调研,适合高质量信息源、交叉验证和风险判断

如果有范围限制,比如地区、时间、竞品、技术栈,也可以一起补充。

Depth behavior:

Phase 1: Plan Approval Gate

After the user chooses depth, draft the overall plan and ask for approval before research.

The plan must include:

End the plan with a clear approval request, for example:

你可以直接回复“批准开始”,也可以修改调研问题、范围、深度或画布模式。

Do not browse, run long local scans, or create nodes while waiting for approval.

Phase 2: Deep Research Execution

After approval, use the research capability chosen in the approved plan.

Research skill selection order:

  1. User-explicit research skill, tool, or workflow, if named and available.
  2. Bundled canvas-deep-research.
  3. The source-backed protocol below, followed directly.

If the runtime does not auto-load the bundled skill, load the canvas-deep-research skill by name before researching.

Research requirements:

For deep, run multiple passes, for example:

  1. primary source pass
  2. landscape and current-state pass
  3. technical or operational detail pass
  4. risks, contradictions, and counterexamples pass
  5. synthesis and canvas handoff pass

Phase 3: Optional Live Research Board

Use this only when the approved plan chooses live-board.

Create a draft workspace or draft area after approval, then update it during research. Recommended draft frames:

Live-board rules:

If the pulse-canvas CLI is unavailable, report progress conversationally and create the canvas only when it becomes available.

Phase 4: Synthesize Canvas Plan

Convert the research brief into a canvas plan.

Planning rules:

Editorial rules — these are what make the board read as a knowledge map

instead of a data dump. Apply them while planning; verify them in Phase 7:

short support bullets. A card is not an article — move long-form prose

into a separate detail card and link it with an edge, so the first view

stays scannable.

If synthesis produces more, merge cards or push depth into linked detail

cards instead of widening the first view.

evidence cards default (~320-380px), side annotations smaller. Never make

every card the same size — uniform sizing erases the argument's shape.

or bottom edge of the board, outside the main narrative flow — never

interleaved with claim cards.

belongs on at most ~20% of cards — reserve it for load-bearing claims.

Uniform emphasis reads as none.

frame (sources and auxiliary material always included) stays neutral

graphite. The restraint is what makes the accents anchor — see Frame

Colors below.

between neighboring cards and frames, give curves a small bend so they

read organically, and avoid edges that cross multiple frames.

If research materially changes the approved plan, show the changed structure and ask for a quick confirmation before final creation.

Node type strategy:

Phase 5: Create Canvas Content

Check existing geometry with pulse-canvas layout read --workspace <id> --format json before creating or arranging content in an existing workspace.

Prefer ONE validated batch plan over command loops. SQLite commits graph changes and file intents in one transaction,

then applies file writes. File effects can partially fail after the commit.

Legacy JSON writes also do not provide a transaction across files:

pulse-canvas workspace create "<topic>" --format json
pulse-canvas apply --workspace <id> --file canvas-plan.json --dry-run --format json
pulse-canvas apply --workspace <id> --file canvas-plan.json --format json

Plan shape (full reference: pulse-canvas apply --help):

{
  "workspace": "<id>",
  "baseRevision": 3,
  "operations": [
    { "action": "create", "type": "frame", "id": "f-overview", "title": "Overview", "x": 40, "y": 70, "width": 900, "height": 520 },
    { "action": "create", "type": "file", "id": "c-thesis", "title": "One-sentence claim", "x": 80, "y": 130, "width": 480, "height": 300, "content": "- support 1\n- support 2" },
    { "action": "createEdge", "from": "c-thesis", "to": "f-overview", "label": "belongs to", "bend": 24 }
  ]
}

The graph has committed and some files may already have changed. Inspect

pulse-canvas doctor --workspace <id> and the reported intent ids. Use

pulse-canvas doctor --workspace <id> --repair to retry pending writes;

resolve external conflicts without overwriting external edits. Re-read the

canvas and its revision before planning further mutations.

when other writers may touch the workspace; on revision_conflict,

re-read the canvas and rebuild the plan.

Single-node commands remain for small incremental edits:

pulse-canvas node create --workspace <id> --type file --title "<node>" --data '{"content":"..."}' --format json
pulse-canvas edge create --workspace <id> --from <nodeId> --to <nodeId> --label "<label>" --kind flow --format json

Write-safety rules (MANDATORY on the CLI path):

create, update, write, or delete calls — no & background jobs, no

multi-shell fan-out, no concurrent sub-agents mutating the same workspace.

Locks serialize legacy writes; SQLite uses conditional revisions. Separate

commands can still interleave or fail on stale state. Prefer one apply plan.

the active-workspace fallback when several workspaces exist — confirm the

target once with pulse-canvas workspace current, then pin it.

Use fallback coordinates only when no layout tool is available.

Phase 6: Apply Layout

Layout commands (run them sequentially, like all mutations):

  1. For each final frame, arrange its children into a grid and fit the frame:
pulse-canvas layout frame-grid --workspace <id> --frame <frame-id> --format json
# optional: --columns <n> --gap <px> --padding <px> --no-fit-frame
  1. Position the frames themselves manually (there is no canvas-level

auto-grid yet): lay frames out in rows using the manual numbers below,

after frame-grid has settled each frame's final size.

  1. Validate the result:
pulse-canvas layout validate --workspace <id> --format json
  1. If validation reports overlaps, frame straddling/overflow, narrow cards,

or an extreme aspect ratio, re-run frame-grid on the affected frame or

move the listed nodes with node update, then validate again.

Manual fallback layout:

Phase 7: Verify and Summarize

Before final response, run the dual-view acceptance:

colored regions with legible section chips, thesis cards visibly larger

than evidence cards, and sources parked on the periphery — not a uniform

grid of same-size cards.

short support bullets with source ids, not a pasted article.

Frame Colors

Default is NEUTRAL. Color is a scarce accent, not a per-frame attribute —

a board where every frame carries its own hue reads as a rainbow

dashboard, which is exactly the look to avoid.

frames stay graphite.

see first, reusing a hue rather than introducing a fourth:

| Accent role | Swatch |

|---|---|

| Entry / overview — "start here" | Sky oklch(0.68 0.108 224) |

| Core analysis — the main argument | Sage oklch(0.68 0.108 142) |

| Risks / tensions / decisions | Coral oklch(0.68 0.108 28) |

Quality Rules

  1. Approval comes before research execution and canvas mutation.
  2. Research findings cite source ids.
  3. Draft live-board content is clearly marked as draft.
  4. Final content is synthesized and actionable, not copied source fragments.
  5. Frames contain 2-4 substantial nodes unless the topic strongly justifies otherwise.
  6. One claim per card; long-form depth lives in linked detail cards.
  7. Size encodes importance, sources stay on the periphery, and colored

emphasis stays under ~20% of cards.

  1. Layout tools are the default for geometry; manual coordinates are fallback only.
  2. Existing unrelated nodes are not moved unless the user approved an organizing action.
  3. Edges explain relationships with short labels and meaningful kinds.
  4. Uncertainty, conflicts, and open questions remain visible in the canvas.
  5. The final canvas focuses on information organization. Action-oriented nodes are opt-in, not default.
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.