dokugent preview¶
The preview command prepares an agent for certification by generating a secure, traceable, and tamper-evident preview file.
What it does¶
- Deletes any existing preview file for the current agent
- Writes a new preview output (
.json) - Runs a security scan on preview files
- Creates/updates the
previews/latestsymlink - Locks the preview file as read-only (
chmod 444) - Creates a
conventions.meta.jsonfile with metadata for all selected convention files
Preview Output Structure¶
.dokugent/
βββ ops/
βββ previews/
βββ [agentId]/
β βββ [agentId]@timestamp_preview.json
βββ latest/ β symlink to latest folder
Security Enforcement¶
- Runs blacklist/whitelist checks via a configurable scan
- Prevents tampering by marking preview output as read-only
Example Usage¶
Output:
π§ Estimated Token Usage: 1020
π Running security scan in: .dokugent/ops/previews/latest
π Found 1 file to scan:
.dokugent/ops/previews/latest/happybot@2025-05-24_19-15-55-492_preview.json
π’ Total files scanned: 1
β
No security issues detected.
π‘ Tip¶
To check for missing approval metadata (e.g., approvedBy, approvalDate) in your agent files, run:
This ensures your output isnβt just content-safe, but also policy-compliant.