Commands¶
DocsForge installs six slash commands in OpenCode and Oh My Pi.
| Command | Purpose |
|---|---|
/docs-init |
Initialize docs infrastructure for the current Git repository |
/docs-sync |
Update only docs affected by current implementation changes |
/docs-audit |
Full, engineering, customer, or screenshot audit |
/docs-code |
Work only on the OpenWiki engineering knowledge base |
/docs-user |
Work only on customer-facing Help Center guides |
/docs-screenshots |
Capture or regenerate real application screenshots |
/docs-init¶
Operations:
- Confirm the Git root.
- Detect the stack, product type, UI, docs framework, E2E tooling, and CI host.
- Preserve existing docs and instructions.
- Create
.documentation/config.yml. - Create the OpenWiki brief and ignore file.
- Select a user-docs adapter.
- Configure the docs-only Playwright harness when a browser UI exists.
- Merge the documentation policy into
AGENTS.md. - Add CI only for the existing CI host.
- Run an initial audit.
It does not generate content.
/docs-sync¶
Operations:
- Resolve the comparison base.
- Run the impact helper.
- Classify changes.
- Update impacted OpenWiki pages and Claims.
- Update impacted customer guides.
- Regenerate affected screenshots.
- Validate links, config, Claims, and images.
- Produce an impact report.
Internal refactors with no behavior or contract change produce no public docs changes.
/docs-audit¶
The auditor reports findings first:
| Severity | Meaning |
|---|---|
| CRITICAL | Security exposure, data leak, or a primary path that cannot succeed |
| HIGH | Materially wrong or missing for a primary journey |
| MEDIUM | Important gap or drift with a workaround |
| LOW | Polish |
It does not rewrite documentation unless remediation is requested.
/docs-code¶
Uses OpenWiki to:
- initialize or update the engineering wiki;
- preserve source references;
- reconcile stale Claims;
- document architecture, data, APIs, security, jobs, caching, storage, AI systems, errors, testing, deployment, configuration, operations, and ADRs;
- keep customer content out.
/docs-user¶
Produces task-based guides with:
- what the feature does;
- who can use it;
- required permissions;
- prerequisites;
- where to find it;
- what to click;
- what to enter;
- how to complete the operation;
- expected result;
- common problems;
- related guides.
/docs-screenshots¶
Uses Playwright to:
- capture real screenshots;
- use synthetic demo data;
- authenticate with a dedicated test user;
- assert the UI state before capture;
- update the inventory;
- regenerate only affected images.
Host behavior¶
OpenCode and OMP both support file-based markdown commands. The same command body is installed in both hosts with host-specific frontmatter.
If a host cannot expose a particular command, the underlying skill remains available for direct invocation.