Readable source that can mature.
The syntax stays minimally intrusive in Markdown. Keep important prompts in files, review changes, and track how behavior evolves without sacrificing readable prose.
Readable, reusable, and composable prompts
WeaveMark is a small, Markdown-native specification language for prompts: you specify abstract intent and the LLM-based processor makes it concrete (either by compilation or dynamic interpretation). The readable, reusable units you write in it are called promplets: each can stand alone or be built from other promplets. Great for both humans and AI agents.
Why use promplets?
Promplets are clear to read, dense with intent, and safe to evolve. Templates fill blanks; WeaveMark gives you a composition surface for reusable promplets.
The syntax stays minimally intrusive in Markdown. Keep important prompts in files, review changes, and track how behavior evolves without sacrificing readable prose.
Refine shared reasoning methods and constraints, then branch with
@if or @match when one source needs
controlled variations.
See the compiled result, validate its contract, then produce a pastable prompt, prompt pack, agent specification, emitted file, or executable promplet.
Structural refinement
The deeper move: one reusable promplet contributes ordering, obligations, and sections to different local prompts.
Worked example
The source stays compact, while the compiled prompt gains the reusable decision structure in the right places.
Follow the cyan reusable obligations. They move into the final prompt as new structure around the local question.
# Decision brief refinement
Every decision brief must:
- Lead with the decision pressure.
- Separate facts, assumptions, and judgment.
- Include counter-evidence and reversal triggers.
@output enforce: strict
Return decision, evidence, counter-evidence,
recommendation, and next action.
Follow the coral local values. They stay concrete while the reusable structure grows around them.
@refine module:weavemark.std.lenses.decision_gate mingle: true
# Launch gate
Should we ship @{release}
to @{segment} this week?
Use @{validation_log}
and @{open_risks}.
@if executive_audience
Compress into board-ready language.
The same colors reappear below: cyan came from the reusable promplet, coral came from the local source. This is a composed prompt, not a filled form.
# Launch gate
Should we ship Aurora 1.0
to beta teams this week?
Start with the decision pressure:
ship, wait, or narrow the rollout.
Use the validation log and
open risks, but separate
facts, assumptions, and judgment.
Include counter-evidence, reversal triggers,
recommendation, and the smallest safe next action.
Use board-ready language.
Batteries included
50+ reusable fragments across many
categories. @refine them into your own promplets instead
of re-deriving expertise — reasoning methods, programming stacks,
teaching moves, and quality gates.
What can you build?
Promplets are deliberately general: the same readable source style can describe pastable prompts, agent specifications, and executable promplets.
Evidence-aware prompts for ChatGPT, Claude, Gemini, or Copilot Chat — investment-brief.weavemark.md.
Implementation-ready specs for Copilot, Claude Code, or Cursor — ai-kanban-board.weavemark.md.
Adapt instruction with @ask, @refine, and branches — learning-tutor.weavemark.md.
Playable browser-game specifications with explicit validation — metro-lines.weavemark.md.
Decision rules, evidence standards, and output contracts — decision-advisor.weavemark.md.
Executable promplets that bind trusted companion functions — portfolio-calculator-agent.weavemark.md.
Language moves
Each directive has a local job: clarify, transform, branch, check, emit, or execute. The result is a promplet that still reads as a document.
@refine weaves reusable promplets into
the current source when you need shared behavior.
@refine module:weavemark.std.reasoning.deep_summary mingle: true
@refine module:weavemark.std.guidelines.evidence_quality mingle: true
# Leadership brief
Summarize @{notes} for @{audience}.
Preserve decisions, risks, evidence, gaps, and next actions.
@ask pauses compilation for missing human context,
then continues with the nested body.
@ask clarifying question detail_level: 30%
@refine module:weavemark.std.teaching.socratic_tutoring mingle: true
# Adaptive tutor
Teach @{topic} using the learner context.
Clarify who the learner is before compiling.
@iterate lets the Processor revisit a transformation
instead of accepting the first useful expansion.
@iterate 2
@expand mode: intention focus: "playable first build"
Metro Lines: draw routes through a living city,
manage congestion, and validate the first playable loop.
Assertions keep required content visible in the source before any assistant sees the final prompt.
@assert contains: "risks"
@assert contains: "open questions"
# Review gate
Name the risk, missing information, and next step.
Using the output
Promplets are not only a nicer way to write one prompt. They can produce pastable prompts, programming-agent specifications, prompt packs, and prompts the WeaveMark Processor executes.
Executable promplets
Declare tool schemas, bind trusted companion implementations, and choose an execution engine — from a single call to tree-of-thought, self-consistency, or reflection, each modeled on established prompting patterns from the literature (Yao et al. 2023, Wang et al. 2022, Shinn & Madaan 2023). The readable document stays the specification everyone can inspect; when execution is requested, the selected engine interprets the compiled artifact at runtime.
@execute tree-of-thought
max_depth: 3
branching_factor: 3
Problem: @{problem}
@prompt thought_step
Provide the next single reasoning step from @{state}.
@prompt evaluate_step
Rate this partial reasoning: "sure", "maybe", or "impossible".
@prompt synthesize
State the final answer from the best reasoning path.
Start here
Build one real promplet first. Then learn the directive moves, explore richer application domains, or jump to the API and reference as needed.
Create a promplet from a blank page: add variables, borrow reusable constraints, branch, and lock the output shape.
Live results
These are real, checked-in browser projects generated through the WeaveMark compile-to-implementation workflow. Play them here, then inspect every source file and artifact on GitHub.
Draw transit lines through a growing city, follow demand trails, and keep the network reliable.
Use W/A/D or arrow keys to thread glowing gates, bend around gravity wells, and chase a faster two-lap time trial.