Skip to content

docs: fix documentation drift — env field status and export-gate-schema command#805

Merged
jamesadevine merged 1 commit into
mainfrom
docs/freshness-audit-fixes-58f68b63dafae927
May 31, 2026
Merged

docs: fix documentation drift — env field status and export-gate-schema command#805
jamesadevine merged 1 commit into
mainfrom
docs/freshness-audit-fixes-58f68b63dafae927

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Documentation Freshness Audit

This audit compared project documentation against the actual codebase to identify drift between docs and implementation. The audit checked:

  1. CLI commands (src/main.rs vs docs/cli.md)
  2. Front matter fields (src/compile/types.rs vs docs/front-matter.md)
  3. Template markers (src/data/*.yml vs docs/template-markers.md)
  4. Safe output tools (src/safeoutputs/ vs docs/safe-outputs.md)
  5. Architecture tree (AGENTS.md vs actual directory structure)

Findings

Area Issue File(s)
Front matter field env: marked as "RESERVED: not yet implemented" but is actually implemented docs/front-matter.md:60-61
CLI command export-gate-schema hidden build-time tool was undocumented docs/cli.md

Details

1. env: Field Status (CRITICAL)

docs/front-matter.md:60-61 incorrectly marked the env: field as "RESERVED" with a comment stating it was "not yet implemented":

# env:                          # RESERVED: workflow-level environment variables (not yet implemented)
#   CUSTOM_VAR: "value"

However, src/compile/types.rs:125-127 shows the field is fully implemented:

/// Workflow-level environment variables
#[serde(default)]
pub env: HashMap<String, String>,

Impact: Users were told a working feature was unavailable, preventing them from using workflow-level environment variables.

Fix: Removed the "RESERVED" comment and uncommented the example, showing the field as available.

2. export-gate-schema Command (DOCUMENTATION GAP)

The export-gate-schema command exists in src/main.rs:424-431:

#[command(hide = true)]
ExportGateSchema {
    /// Output path; if omitted, prints to stdout.
    #[arg(short, long)]
    output: Option<std::path::PathBuf>,
},

It was referenced in docs/cli.md:120-122 but never introduced or explained in the main command list.

Impact: Contributors working on the scripts/ado-script TypeScript workspace had no documentation for this build-time tool.

Fix: Added a new "Hidden Build-Time Tools" section in docs/cli.md documenting export-gate-schema with usage and context.

Applied Fixes

  • Uncommented env: field in docs/front-matter.md and removed incorrect "RESERVED" status
  • Documented export-gate-schema in new "Hidden Build-Time Tools" section in docs/cli.md

Verified Accurate (No Changes Needed)

  • ✅ CLI commands — all commands in src/main.rs Commands enum are documented
  • ✅ Template markers — all markers in base.yml, 1es-base.yml, job-base.yml, stage-base.yml are documented in docs/template-markers.md
  • ✅ Safe output tools — all 24 tools in src/safeoutputs/ are documented in docs/safe-outputs.md
  • ✅ FrontMatter fields — all fields in src/compile/types.rs are documented across docs/front-matter.md and linked concept docs
  • ✅ Architecture tree — AGENTS.md:44-150 accurately reflects actual directory structure
  • ✅ Schedule syntax — docs/schedule-syntax.md matches src/fuzzy_schedule.rs

This pull request was created by the automated documentation freshness check workflow.

Generated by Documentation Freshness Check · ● 1.6M ·

…ma command

Fixes identified in documentation freshness audit:

1. **docs/front-matter.md** — Removed incorrect RESERVED comment from
   env: field. The field is implemented (src/compile/types.rs:125-127)
   and has been available since early versions. Documentation incorrectly
   told users the feature was unavailable.

2. **docs/cli.md** — Documented export-gate-schema hidden build-time tool
   in a new 'Hidden Build-Time Tools' section. This command exists in
   src/main.rs:424-431 but was previously only mentioned in passing
   without proper introduction.

All other documentation checked and found accurate:
- CLI commands match src/main.rs Commands enum
- Template markers in docs/template-markers.md match all four template files
- Safe output tools are fully documented (24 tools in src/safeoutputs/)
- FrontMatter struct fields are documented across docs/front-matter.md
  and linked per-concept docs
- AGENTS.md architecture tree matches actual directory structure

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review May 31, 2026 13:13
@jamesadevine jamesadevine merged commit 6a05326 into main May 31, 2026
@jamesadevine jamesadevine deleted the docs/freshness-audit-fixes-58f68b63dafae927 branch May 31, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant