archify
Archify
Create checked standalone HTML as a native diagram or a one-page explainer that answers a question.
Run commands from your working directory. Unless the user names another location, give each new artifact request its own folder .archify/<type>-<slug>-<YYYYMMDD-HHMMSS>/ there (local time, chosen once): keep the candidate and <slug>.html in it and reuse it for repairs. Native diagrams use candidate.json with meta.output relative to the working directory; explainers may use candidate.archify.md and a portable output filename. A later request gets a new folder. Replace bin/archify.mjs in every command with the installed package's absolute path, or its path relative to your working directory; CLI input and output paths resolve from that directory.
For a native diagram of a real codebase, read Repository authoring while tracing the requested behavior. A system description uses the native steps below; a frozen candidate uses the handoff path.
Choose the artifact
- When the user asks to draw or visualize a system, flow, schema or history, use a native diagram and the Type router.
- Use
explainerwhen the user asks for the answer as a page: a page, one page, an explainer, something to share (“做成一页”, “用页面讲”, “answer with a page”). Without such a request, answer in text or draw the requested diagram. A page made on request ends its reply with the one-line mode offer under Output. - A rules line in context changes this.
[archify explainer: proactive]: also make a page, unasked, for an explanation, comparison, trade-off, decision, diagnosis, review or plan that needs a table, steps or several sections.[archify explainer: always-on]: every reply that reaches a conclusion also gets a compact page of at most four panels, delivered without opening it, its link closing the reply.[archify explainer: on-demand]: only when asked, and never offer a mode. - In every mode a page needs a conclusion with some structure behind it: chat, one-line answers, raw command output and text-only requests get none.
- For
explainer, read Explainer authoring for its conclusion, reasons, scope, board layout and optional native diagrams. Write the complete draft, then runfinalize explainerfor validation, atomic delivery and artifact checks. Use panel patch for local content revisions.
Existing candidate handoff
When the user supplies a frozen candidate, run finalize first as one CLI invocation. Its passing receipt completes the automated gates; follow any visual review recommendation under Delivery before claiming visual quality. For repair, follow step 5.