New to FORGE? Start a free 30-day trial

Documentation Workflows

Updated on Oct 1, 2026

frg docs writes project documentation from an issue's implementation plan, builds the documentation, and answers questions about it. Use it when documentation work belongs to an issue that already has a plan from frg issue plan.

Prerequisites

  • A valid Telerik license. See Licensing.

  • A supported coding agent, installed and authenticated. Check it with frg status.

  • An Issue ID in the current context. Without one, Forge stops with Issue ID required for 'docs' operations.

    bash
    frg config set-issue 123     # or: export FORGE_ISSUE_ID=123
  • An implementation plan in .forge/work/job_<issue_id>/code/ (README.md, research.md, tasks.md, phase_x.md). Create it with frg issue plan.

  • The documentation sources and build configuration in your repository.

Subcommands at a glance

SubcommandWhat it doesTypical inputsOutputsDefault role
createGenerates documentation or guidesImplementation plan, source code, existing docsDocumentation files in the repository's documentation directoriestechnical_writer
buildBuilds documentation and reports the resultImplementation plan, documentation sources.forge/work/job_<issue_id>/docs/build_report.mdtechnical_writer
askAnswers a question about the documentationQuestion, implementation plan, docs.forge/work/job_<issue_id>/docs/answer.mdtechnical_writer

Typical flow

text
issue plan ──► docs ask ──► docs create ──► docs build ──► fix sources ──► docs build ──► commit docs
                                                  │                             ▲
                                                  └── build_report.md ──────────┘
  1. Set the issue and make sure its plan exists:

    bash
    frg config set-issue 123
    ls .forge/work/job_123/code/
  2. Find the gaps:

    bash
    frg docs ask "Which new APIs from this issue are undocumented?"
  3. Write the documentation:

    bash
    frg docs create
  4. Build it and read the report:

    bash
    frg docs build
    cat .forge/work/job_123/docs/build_report.md
  5. Fix any reported errors, rebuild, and commit the documentation files. Keep reports under .forge/work/ out of version control.

Options shared by all subcommands

Every frg docs subcommand accepts these options.

OptionDescriptionDefault
-a, --agent <NAME>Coding agent for this run: claude_code, github_copilot, or opencode.Agent in agents.toml
-r, --role <ROLE>Overrides the default role: product_manager, software_engineer, software_architect, technical_writer, security_analyst, sre. Cannot be combined with --custom-agent.technical_writer
--custom-agent <NAME>Selects a custom agent configuration inside your coding agent. Cannot be combined with --role.None
-m, --model <MODEL>Overrides the model configured in agents.toml.Model in agents.toml
-c, --context-file <FILE>Adds a file path as context. Repeatable.None
--context-dir <DIR>Adds a directory as context. Repeatable. Up to 100 files per directory and 1 MB per file.None
--clearClears the existing agent session and starts fresh.Off
--retry [<INSTRUCTIONS>]Continues the previous session to complete missing outputs. Requires an existing session; cannot be combined with --clear.Off
--auto-retryRetries once automatically when expected outputs are missing. Cannot be combined with --clear.Off
--print-promptPrints the compiled prompt without running the agent.Off
--bypass-safety-checksSkips prompt-injection validation. Bypasses are logged.Off
-q, --quietSuppresses all output except errors.Off

frg docs create

Generates documentation from the issue requirements, research, tasks, implementation phases, source code, and existing documentation. Files are written to the repository's documentation directories, not to .forge/work/, so they can be committed.

text
frg docs create [OPTIONS]
OptionDescription
--edit [<INSTRUCTIONS>]Refines the documentation with your instructions, given inline or in edit.md.
bash
frg docs create
frg docs create --edit "Add a troubleshooting section for the new config keys"

frg docs build

Builds the documentation with the project's documentation framework, analyzes errors and warnings, and writes a report. Built artifacts stay in the framework's default output location.

text
frg docs build [OPTIONS]
OptionDescription
--devFocuses on the developer/API audience.
bash
frg docs build
frg docs build --dev

Output: .forge/work/job_<issue_id>/docs/build_report.md, with the build command, status, errors, warnings, artifact location, and recommended fixes.

Notes:

  • frg docs build has no --fix option. Use the report to correct sources or configuration, then run the build again.

frg docs ask

Answers a question about the project's documentation. It does not change documentation.

text
frg docs ask [OPTIONS] [QUESTION]

No additional options.

bash
frg docs ask "What sections need updating?"
frg docs ask "Is the API reference complete?"

Output: .forge/work/job_<issue_id>/docs/answer.md.

See Also