Workflow Guides

Last updated: March 2026

Task-based guides for the most common DocCraft workflows. Each guide is self-contained — follow the steps in order, and you'll have a working result by the final step.

In this guide
  1. Generate an API reference
  2. Generate a README from a GitHub repo
  3. Regenerate and iterate on a section
  4. Export and publish to Confluence
  5. Apply a documentation template
  6. Auto-generate docs via CI/CD webhook
  7. Compare versions with side-by-side diff
  8. Add custom compliance rules

Generate an API reference from an OpenAPI spec

Produce a complete, publishable API reference in under five minutes.

5 min OpenAPI / Swagger
Before you start

You need an OpenAPI 3.x specification in .yaml, .yml, or .json format. OpenAPI 2.x (Swagger) files work but produce less detailed output because Swagger lacks the schema depth of OAS 3.x. If you only have a Swagger file, consider upgrading it with the Swagger Editor before proceeding.

1
Open a new document

From the DocCraft Dashboard, click New Document. The input panel opens on the right side of the screen.

If you already have an open project, you can also click + New in the top navigation bar.

2
Upload your spec file

In the input panel, select the Upload tab. Drag your spec file into the upload zone, or click Browse to select it from disk.

DocCraft validates the file on upload. A green checkmark confirms the spec is valid. If validation fails, an error summary appears — the most common causes are an invalid YAML structure or unresolved $ref paths.

Large specs

Specs with more than 150 endpoints take longer to process (typically 30–60 seconds). DocCraft handles large specs fully — it does not truncate or skip endpoints. If you're uploading a spec this size, keep the browser tab active during processing.

3
Select "API Reference" as the document type

In the Document Type dropdown, select API Reference. This template generates:

  • An overview section — pulled from the info.description field in your spec
  • An authentication guide — generated from your securitySchemes definitions
  • An endpoint-by-endpoint reference — one section per path and method, with parameters, request body, and response schemas
  • An error reference — consolidated from all 4xx and 5xx response definitions
4
Set generation options

Expand Advanced options to adjust how DocCraft writes the output. For API references, these options are most relevant:

  • Tone — set to Technical for developer audiences. If you're writing for a business audience, Professional produces less jargon-heavy prose.
  • Include code samples — enabled by default. DocCraft generates curl, Python, JavaScript, and Go samples for every endpoint. Disable this if you plan to add code samples manually.
  • Authentication treatment — choose between Inline (auth requirements appear on each endpoint) or Dedicated section (a single authentication guide at the top).
Code sample accuracy

Generated code samples are syntactically correct and structurally accurate, but they use placeholder values for API keys and base URLs. Review the authentication section and replace placeholders before publishing.

5
Generate and review the output

Click Generate. Generation typically completes in 20–45 seconds for an average-size spec. The document opens in the editor when ready.

Review the output in this order:

  1. Overview section — check that the product description is accurate and reads naturally. If your spec's info.description was sparse, DocCraft fills in context — verify it's correct.
  2. Authentication guide — confirm the auth flows match your actual implementation, not just the spec definition.
  3. A sampling of endpoints — spot-check 3–5 endpoints. The parameter tables and schema descriptions are generated from your spec — they should be accurate, but verify the behavior descriptions are correct.
  4. Code samples — confirm syntax is correct for your API's structure. Replace any placeholder values.
6
Export the finished document

Click Export in the editor toolbar and choose your target format:

  • Markdown — for GitHub wikis, static site generators (Docusaurus, MkDocs), or Git repos
  • HTML — for self-hosted developer portals or embedding in existing documentation sites
  • Confluence — for publishing directly to an internal Confluence space

Your exported file downloads immediately. It is also saved to your project's Exports tab for 30 days.

Result

A complete, publish-ready API reference with an overview, authentication guide, full endpoint reference, and multi-language code samples.


Generate a README from a GitHub repository

Produce a complete, well-structured README from a public GitHub repository.

3 min GitHub URL
Before you start

The repository must be publicly accessible. Private repository support requires a GitHub OAuth connection under Settings → Integrations → GitHub. Repositories with at least some inline code comments, existing README text, or a package.json / pyproject.toml file produce better output.

1
Paste the repository URL

Open a new document from the Dashboard. In the input panel, select the URL tab and paste the GitHub repository URL — for example, https://github.com/your-org/your-repo.

DocCraft reads the repository's file structure, README (if any), code files, and configuration files. It does not clone the repository — it reads via the GitHub API, which means it respects public/private access controls.

2
Select "README" as the document type

In the Document Type dropdown, select README. This generates a GitHub-convention README with the following sections:

  • Title and badges — project name, version, license, and CI/CD status badges (populated where data is available)
  • Project description — a concise description of what the project does and the problem it solves
  • Prerequisites and installation — inferred from package managers and configuration files (package.json, requirements.txt, Gemfile, etc.)
  • Usage examples — basic usage snippets generated from code structure and any existing examples
  • Configuration reference — table of environment variables or config options, when detectable
  • Contributing guide — boilerplate contributing instructions with project-specific branching details where detectable
3
Review the generated badge block

DocCraft generates badge markup using standard shields.io patterns. After generation, verify that badge URLs are accurate — particularly:

  • Package version badges reference your actual package manager and package name
  • License badge references the license actually used in the repository
  • CI/CD badge URL is correct for your CI provider and workflow name

Replace any placeholder values in the badge block before publishing. Select the badge block in the editor and use Regenerate Section to ask DocCraft to update specific badges if you have additional information to provide.

4
Export as Markdown

Click Export → Markdown. The downloaded .md file is ready to replace or supplement your repository's existing README.md.

Version control note

The exported README is a standalone file — it does not automatically update in the repository. Commit the file to your repo as you would any other markdown file. If you connected the GitHub integration, you can push the file directly from the Export panel using Export → Push to GitHub.


Regenerate and iterate on a section

Revise a section of a generated document without regenerating the entire document.

2 min Document Editor
Before you start

You need an existing generated document open in the editor. This workflow applies to any document type — API references, READMEs, user guides, and admin guides all support section-level regeneration.

1
Select the section to revise

In the editor, click anywhere inside the section you want to regenerate. The section highlights with a subtle border — this is the active selection indicator. You can also select a section from the Outline panel on the left by clicking its name.

DocCraft treats the content between two headings as a single section. If you want to regenerate only a paragraph within a section, highlight that paragraph with your cursor instead.

2
Open the Regenerate panel

With the section selected, click the Regenerate button in the editor toolbar (the circular arrow icon). The Regenerate panel slides in from the right side.

The panel shows the current section content and an instruction field. You can provide natural language instructions to guide the revision — for example:

Make this section more concise — cut it to 3 short paragraphs maximum. Add a Python code example after the second paragraph. Rewrite this in a friendlier, less formal tone. Change all references from "the user" to "you".
3
Enter your revision instructions and regenerate

Type your instructions in the field and click Apply Revision. DocCraft regenerates the selected section based on your instructions, preserving the surrounding document structure.

Regeneration for a single section typically completes in 5–15 seconds.

Instruction specificity

More specific instructions produce more predictable results. Vague instructions like "make this better" are less effective than targeted instructions like "shorten to two paragraphs and add a callout box noting the 60-second timeout limit". DocCraft works best when you describe the desired outcome, not just the quality judgment.

4
Accept or discard the revision

The regenerated section appears with a yellow highlight to indicate it's a pending revision. Review the change:

  • Click Accept to replace the original section with the revision.
  • Click Discard to keep the original and try again with different instructions.
  • Click Compare to view the original and revised sections side by side before deciding.

Accepted revisions are saved to the document immediately and included in the next export.


Export and publish to Confluence

Connect DocCraft to your Confluence workspace and publish documentation directly.

10 min setup · 1 min per publish Integration
Required permissions

You need a Confluence account with Create Page and Edit Page permissions on at least one space. If you're connecting to a company Confluence instance, confirm with your administrator that API token access is permitted for your account.

1
Generate a Confluence API token

In a separate browser tab, go to id.atlassian.com/manage-profile/security/api-tokens. Click Create API token, give it a label (such as "DocCraft integration"), and copy the token value.

Copy the token now

Atlassian shows the API token value only once. Copy it before closing the dialog. If you lose it, you must revoke the token and generate a new one.

2
Add the Confluence integration in DocCraft

In DocCraft, go to Settings → Integrations → Confluence. Fill in the three required fields:

  • Workspace URL — your Confluence base URL, for example https://yourorg.atlassian.net. Do not include a trailing slash or a space path.
  • Account email — the email address on your Atlassian account. This is the account the API token belongs to.
  • API token — paste the token you copied in step 1.

Click Test connection. DocCraft makes a test call to the Confluence API to verify the credentials. A green success message confirms the connection is working.

3
Publish a document

Open the document you want to publish in the editor. Click Export → Publish to Confluence. A dialog prompts you to select:

  • Space — the Confluence space where the page will be created. DocCraft lists all spaces your account can write to.
  • Parent page — the page the new document will be created under. Leave blank to create the page at the space root.
  • Page title — defaults to the document title. Edit it here if you need a different title in Confluence.

Click Publish. DocCraft converts the document to Confluence storage format and creates the page. A confirmation message with a direct link to the new Confluence page confirms success.

Updating an existing page

If you publish to a space and parent page where a page with the same title already exists, DocCraft creates a new version of that page — it does not create a duplicate. Confluence's version history tracks the previous versions. To publish to a specific existing page by ID instead of title, use the Page ID option in the advanced publish settings.


Apply a documentation template

Restructure an existing document to match a preset template — without regenerating from source.

3 min Document Editor
When to use templates

Templates are useful when you need documentation to conform to an internal style guide — for example, when all your API references must start with an overview, follow a specific authentication section format, and end with a support contact block. Templates enforce structure without changing the generated content.

1
Open the template browser

With a document open in the editor, click Templates in the toolbar (the grid icon). The template browser opens in a side panel.

Templates are organized by document type — API Reference, README, User Guide, Admin Guide, and Release Notes. There are also industry-specific templates (for example, Financial API Reference or Healthcare Integration Guide) that include compliance callout sections.

2
Preview the template

Click any template to preview its section structure and a sample rendering. The preview shows the section order, default callout positions, and example content blocks so you can compare it to your current document structure before applying it.

If you have custom templates saved in your team's Template Library, they appear at the top of the list marked with a team badge.

3
Apply the template

Click Apply template. DocCraft maps your existing document sections to the template structure:

  • Sections that match a template slot are placed in the corresponding position.
  • Sections that have no match are preserved at the end of the document in an Uncategorized group — you can drag them into position or delete them.
  • Template slots with no matching content are added as empty sections with placeholder headings — fill them in manually or use Regenerate Section to generate content.
Applying a template is reversible

DocCraft saves a snapshot of your document before applying a template. If the result isn't what you expected, click Undo template in the toolbar to restore the previous structure. Undo is available until you navigate away from the document or export it.


Auto-generate docs via CI/CD webhook

Trigger automatic documentation generation every time code is pushed.

10 min setup Automation
1
Set up your webhook secret

Add DOCCRAFT_WEBHOOK_SECRET to your Vercel environment variables (or .env.local for local development). This secret authenticates incoming webhook requests.

2
Add a CI step to your pipeline

In your GitHub Actions workflow (or any CI tool), add a step that posts to the webhook endpoint after a successful build or push:

curl -X POST https://doccraft-ten.vercel.app/api/webhooks/ci \ -H "Content-Type: application/json" \ -H "x-doccraft-secret: $DOCCRAFT_WEBHOOK_SECRET" \ -d '{ "repositoryUrl": "https://github.com/your-org/your-repo", "branch": "main", "docType": "release-notes", "audience": "mixed", "tone": "instructional" }'
3
Receive the generated document

The webhook returns a JSON response containing the generated document, repo metadata, and source file list. Optionally include "publishToGithub": true with a githubToken to auto-commit the output back to the repository.


Compare versions with side-by-side diff

See exactly what changed between your original draft and the current version.

1 min Document Editor
1
Save a snapshot (optional)

Before making edits, click Save Snapshot in the editor toolbar. This saves the current state so you can compare against it later. The initial generation baseline is always available automatically.

2
Open the Version Diff panel

Click the Version Diff button (GitCompare icon) in the editor toolbar. A side-by-side comparison panel appears below the editor.

3
Select a version to compare against

Use the dropdown to choose any saved version — the original baseline or any snapshot. The diff highlights added lines (green), removed lines (red), and changed lines (amber). A badge shows the total number of changed lines.


Add custom compliance rules

Create your own governance checks beyond the built-in MSTP compliance.

3 min Compliance
1
Open the Custom Rules panel

In the Document Editor, click the Custom Rules button (ShieldPlus icon) in the toolbar.

2
Define your rule

Fill in the rule fields:

  • Rule name — e.g., "Forbidden internal codename"
  • Instruction — What the rule enforces, e.g., "Flag any mention of Project Phoenix"
  • Severity — Error, Warning, or Suggestion
  • Trigger terms — Comma-separated terms that trigger the rule
  • Replacement — (Optional) Suggested replacement text

Click Add Rule. Rules are saved in your browser and persist across sessions.

3
Run compliance check

Click the Compliance Check button (ShieldCheck icon). Your custom rules are applied alongside the built-in MSTP checks. Results show each issue with its severity and the line where it was found.


Related
UI Reference — panels, controls, and settings →
Need more help?
→ Troubleshooting Guide